Preserving data types and file configuration when working on existing excel files #1636
Unanswered
coyote1223
asked this question in
Q&A
Replies: 2 comments 5 replies
-
Sorry - don't know. I have not worked with data and types in Excel with "Standard" to "Accounting". I'm assuming you create or are given the xlsx already setup? Or do you create it with PowerShell and the module? If the xlsx is created elsewhere and you need to process it, what happens if you open the xlsx and you change things, do the types change from "Standard" to "Accounting"? |
Beta Was this translation helpful? Give feedback.
5 replies
-
Yes. I suspect the ImportExcel has an issue in a lower layer
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello. I have an existing excel file that has multiple sheets and the data type of values in the cells is "Standard". When I simply open and close the file, the data types change from "Standard" to "Accounting". My goal is to open that existing file, make a change to one of its sheets and keep the configuration and settings (pivots, formulas etc.) it had before I edited the file.
This is the code I use to open and close the file:
$filePath = "C:\Users\myUserName\excelFiles\excel-Management.xlsx"
$workbook = Open-ExcelPackage -path $filePath
Close-ExcelPackage $workbook -SaveAs $filePath
I tried using the Set-WorksheetProtection in different ways but it unfortunately did not work.
I would be very thankful for support on this.
Beta Was this translation helpful? Give feedback.
All reactions