From 0d4a32e266830f3211e312238f692b77af2685dc Mon Sep 17 00:00:00 2001 From: Davis Henckel <51898571+DavisHenckel@users.noreply.github.com> Date: Fri, 26 Nov 2021 14:42:44 -0800 Subject: [PATCH] Change phrasing to show better MD style Added additional headings to read more easily. --- FAQ/How to Write to an Existing Excel File.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/FAQ/How to Write to an Existing Excel File.md b/FAQ/How to Write to an Existing Excel File.md index 9a9839a..3aed143 100644 --- a/FAQ/How to Write to an Existing Excel File.md +++ b/FAQ/How to Write to an Existing Excel File.md @@ -12,13 +12,14 @@ $WorkSheet = $ExcelPkgFile.Workbook.Worksheets["sheet1"].Cells #open excel works Visual of Data Structure: ![DataStructureExcelPkg](/images/FAQ_Images/DataStructureExcelPkg.png) -Modify a specific value by accessing row/col like a 2D Array: +### Modify a Specific Value in a File +Values can be accessed by row, col. Similar to a 2D array. ```powershell $WorkSheet[1,4].Value = "New Column Header" #Starts at index 1 not 0 ``` Contents of file.xlsx after modifying: -![ExcelFileContentsPostAdd](/images/FAQ_Images/ExcelFileContentsPostAdd.png) -Can also load a value at a specific index: +![ExcelFileContentsPostAdd](/images/FAQ_Images/ExcelFileContentsPostAdd.png) +### Load Value at Specific Index ```powershell $ValueAtIndex = $WorkSheet[2,1].Value #Loads the value at row 2, column A ```