怎样用jxl给excel文档增加创建信息

怎样用jxl给excel文档增加创建信息,第1张

这个功能靠jxl是做不到的,下面是api的部分方法,你可以看看:(有点乱,你可以到网上下一个完整的)

setAlignment(Alignment) - Method in class jxl.write.WritableCellFormat

Sets the horizontal alignment for this format

setArrayGrowSize(int) - Method in class jxl.WorkbookSettings

Sets the amount of memory by which to increase the amount of memory allocated to storing the workbook data.

setAutoFilterDisabled(boolean) - Method in class jxl.WorkbookSettings

Sets the autofilter disabled

setAutomaticFormulaCalculation(boolean) - Method in class jxl.SheetSettings

Sets the automatic formula calculation flag

setAutosize(boolean) - Method in class jxl.CellView

Sets the autosize flag.

setBackground(Colour) - Method in class jxl.write.WritableCellFormat

Sets the background colour for this cell format

setBackground(Colour, Pattern) - Method in class jxl.write.WritableCellFormat

Sets the background colour and pattern for this cell format

setBoldStyle(WritableFont.BoldStyle) - Method in class jxl.write.WritableFont

Sets the bold style for this font, if the font hasn't been initialized

setBorder(Border, BorderLineStyle) - Method in class jxl.write.WritableCellFormat

Sets the specified border for this format

setBorder(Border, BorderLineStyle, Colour) - Method in class jxl.write.WritableCellFormat

Sets the specified border for this format

setBottomMargin(double) - Method in class jxl.SheetSettings

Sets the bottom margin

setCellFeatures(WritableCellFeatures) - Method in interface jxl.write.WritableCell

Sets the cell features

setCellFormat(CellFormat) - Method in interface jxl.write.WritableCell

Sets the cell format for this cell

setCellValidationDisabled(boolean) - Method in class jxl.WorkbookSettings

Sets the ignore cell validation flag

setCharacterSet(int) - Method in class jxl.WorkbookSettings

Sets the character set.

setColour(Colour) - Method in class jxl.write.WritableFont

Sets the colour for this font, if the font hasn't been initialized

setColourRGB(Colour, int, int, int) - Method in class jxl.write.WritableWorkbook

Sets the RGB value for the specified colour for this workbook

setColumn(double) - Method in class jxl.write.WritableImage

Accessor for the image position

setColumnGroup(int, int, boolean) - Method in interface jxl.write.WritableSheet

Sets a column grouping

setColumnView(int, int) - Method in interface jxl.write.WritableSheet

Sets the width of the column on this sheet, in characters.

setColumnView(int, int, CellFormat) - Method in interface jxl.write.WritableSheet

Deprecated. Use the CellView bean instead

setColumnView(int, CellView) - Method in interface jxl.write.WritableSheet

Sets the view for this column

setComment(String) - Method in class jxl.write.WritableCellFeatures

Sets the cell comment

setComment(String, double, double) - Method in class jxl.write.WritableCellFeatures

Sets the cell comment and sets the size of the text box (in cells) in which the comment is displayed

setCopies(int) - Method in class jxl.SheetSettings

Sets the number of copies

setDataValidationList(Collection) - Method in class jxl.write.WritableCellFeatures

The list of items to validate for this cell.

setDataValidationRange(int, int, int, int) - Method in class jxl.write.WritableCellFeatures

The list of items to validate for this cell in the form of a cell range.

setDataValidationRange(String) - Method in class jxl.write.WritableCellFeatures

Sets the data validation based upon a named range

setDate(Date) - Method in class jxl.write.DateTime

Sets the date for this cell

setDate(Date, DateRecord.GMTDate) - Method in class jxl.write.DateTime

Sets the date for this cell, performing the necessary timezone adjustments

setDefaultColumnWidth(int) - Method in class jxl.SheetSettings

Sets the default column width

setDefaultRowHeight(int) - Method in class jxl.SheetSettings

Sets the default row height

setDescription(String) - Method in class jxl.write.WritableHyperlink

Sets the description to appear in the hyperlink cell

setDimension(int) - Method in class jxl.CellView

Deprecated. use the setSize method instead

setDisplayZeroValues(boolean) - Method in class jxl.SheetSettings

Sets the displayZeroValues property

setDrawingsDisabled(boolean) - Method in class jxl.WorkbookSettings

Disables the handling of drawings

setEncoding(String) - Method in class jxl.WorkbookSettings

Sets the encoding for this workbook

setExcel9File(boolean) - Method in class jxl.WorkbookSettings

setExcelDisplayLanguage(String) - Method in class jxl.WorkbookSettings

Sets the language in which the generated file will display

setExcelRegionalSettings(String) - Method in class jxl.WorkbookSettings

Sets the regional settings for the generated excel file

setFile(File) - Method in class jxl.write.WritableHyperlink

Sets the file activated by this hyperlink

setFitHeight(int) - Method in class jxl.SheetSettings

Sets the number of pages vertically that this sheet will be printed into

setFitToPages(boolean) - Method in class jxl.SheetSettings

Accessor for the fit to pages flag

setFitWidth(int) - Method in class jxl.SheetSettings

Sets the number of pages widthwise which this sheet should be printed into

setFontName(String) - Method in class jxl.HeaderFooter.Contents

Sets the font of text subsequently appended to this object..

setFontSize(int) - Method in class jxl.HeaderFooter.Contents

Sets the font size of text subsequently appended to this object.

setFooter(HeaderFooter) - Method in class jxl.SheetSettings

Sets the footer

setFooter(String, String, String) - Method in interface jxl.write.WritableSheet

Deprecated. use the SheetSettings bean

setFooterMargin(double) - Method in class jxl.SheetSettings

Sets the margin for any page footer

setFormat(CellFormat) - Method in class jxl.CellView

Sets the cell format for this group of cells

setFormulaAdjust(boolean) - Method in class jxl.WorkbookSettings

Setter for the formula adjust disabled property

setGCDisabled(boolean) - Method in class jxl.WorkbookSettings

Sets the garbage collection disabled

setHeader(HeaderFooter) - Method in class jxl.SheetSettings

Sets the header

setHeader(String, String, String) - Method in interface jxl.write.WritableSheet

Deprecated. use the SheetSettings bean

setHeaderMargin(double) - Method in class jxl.SheetSettings

Sets the margin for any page headers

setHeight(double) - Method in class jxl.write.WritableImage

Accessor for the image dimensions Note that the actual size of the rendered image will depend on the height of the rows it spans

setHidden(boolean) - Method in class jxl.CellView

Sets the hidden status of this row/column

setHidden(boolean) - Method in class jxl.SheetSettings

Sets the hidden status of this worksheet

setHidden(boolean) - Method in interface jxl.write.WritableSheet

Deprecated. use the SheetSettings bean instead

setHideobj(int) - Method in class jxl.WorkbookSettings

The HIDEOBJ record stores options selected in the Options dialog,View tab Possible values are: HIDEOBJ_HIDE_ALL, HIDEOBJ_SHOW_ALL and HIDEOBJ_SHOW_PLACEHOLDERS

setHorizontalCentre(boolean) - Method in class jxl.SheetSettings

Sets the horizontal centre

setHorizontalFreeze(int) - Method in class jxl.SheetSettings

Sets the row at which the pane is frozen horizontally

setHorizontalPrintResolution(int) - Method in class jxl.SheetSettings

Sets the horizontal print resolution

setIgnoreBlanks(boolean) - Method in class jxl.WorkbookSettings

Sets the ignore blanks flag

setImageAnchor(Drawing.ImageAnchorProperties) - Method in class jxl.write.WritableImage

Accessor for the anchor properties

setIndentation(int) - Method in class jxl.write.WritableCellFormat

Sets the indentation of the cell text

setInitialFileSize(int) - Method in class jxl.WorkbookSettings

Sets the initial amount of memory allocated to store the workbook data when reading a worksheet.

setItalic(boolean) - Method in class jxl.write.WritableFont

Sets the italic indicator for this font, if the font hasn't been initialized

setLeftMargin(double) - Method in class jxl.SheetSettings

Sets the left margin

setLocale(Locale) - Method in class jxl.WorkbookSettings

Sets the locale used by JExcelApi to generate the spreadsheet.

setLocation(String, WritableSheet, int, int, int, int) - Method in class jxl.write.WritableHyperlink

Sets the location of the cells to be linked to within this workbook

setLocked(boolean) - Method in class jxl.write.WritableCellFormat

Sets whether or not this XF record locks the cell.

setMergedCellChecking(boolean) - Method in class jxl.WorkbookSettings

Accessor to set the merged cell checking

setName(String) - Method in interface jxl.write.WritableSheet

Sets the name of this sheet

setNamesDisabled(boolean) - Method in class jxl.WorkbookSettings

Disables the handling of names

setNormalMagnification(int) - Method in class jxl.SheetSettings

Accessor for the normal magnificaton factor.

setNumberValidation(double, BaseCellFeatures.ValidationCondition) - Method in class jxl.write.WritableCellFeatures

Sets the numeric value against which to validate

setNumberValidation(double, double, BaseCellFeatures.ValidationCondition) - Method in class jxl.write.WritableCellFeatures

Sets the numeric range against which to validate the data

工具-宏中的VB编辑器,插入-模块。复制下列程序

Sub test()

Dim r As Range

For Each r In ActiveSheet.UsedRange

r = "jxl" &r

Next

End Sub

关闭VB编辑器,在任一需要加单引号的工作表上,点工具-宏,找到test,点执行即可。


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/bake/11737204.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-05-18
下一篇 2023-05-18

发表评论

登录后才能评论

评论列表(0条)

保存