Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Loading and Modifying Files

Francois Botha edited this pageFeb 26, 2018 ·3 revisions

Loading a workbook created with ClosedXML:

varworkbook=newXLWorkbook("BasicTable.xlsx");

BasicTable.jpg

Modifying the workbook:

varws=workbook.Worksheet(1);// Change the background color of the headersvarrngHeaders=ws.Range("B3:F3");rngHeaders.Style.Fill.BackgroundColor=XLColor.LightSalmon;// Change the date formatsvarrngDates=ws.Range("E4:E6");rngDates.Style.DateFormat.Format="MM/dd/yyyy";// Change the income values to textvarrngNumbers=ws.Range("F4:F6");foreach(varcellinrngNumbers.Cells()){cell.DataType=XLCellValues.Text;cell.Value+=" Dollars";}

BasicTableModified.jpg

Saving the workbook:

workbook.SaveAs("BasicTable_Modified.xlsx");

FAQ

Examples

Real world scenarios

Time Savers

Performance and Memory

Misc

Inserting Data/Tables

Styles

Ranges

Rows

Columns

Page Setup (Print Options)

AutoFilters

Comments

Dev docs

Clone this wiki locally


[8]ページ先頭

©2009-2025 Movatter.jp