mirror of
https://github.com/dfinke/ImportExcel.git
synced 2025-12-06 00:23:20 +00:00
First version of file, with Image.
This commit is contained in:
@@ -0,0 +1,19 @@
|
|||||||
|
# Write to an Existing Excel File
|
||||||
|
### Enumerate the Excel File
|
||||||
|
```powershell
|
||||||
|
$ExcelPkgFile = Open-ExcelPackage -Path "C:\Test\file.xlsx"
|
||||||
|
```
|
||||||
|
Contents of file.xlsx:
|
||||||
|

|
||||||
|
### Enumerate the Worksheet to View or Modify the Data
|
||||||
|
```powershell
|
||||||
|
$WorkSheet = $ExcelPkgFile.Workbook.Worksheets["sheet1"].Cells #open excel worksheet cells from worksheet "sheet1"
|
||||||
|
```
|
||||||
|
Visual of Data Structure:
|
||||||
|

|
||||||
|
|
||||||
|
Modify a specific value by accessing row/col like a 2D Array:
|
||||||
|
```powershell
|
||||||
|
$WorkSheet[1,4].Value = "New Column Header" #Starts at index 1 not 0
|
||||||
|
```
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user