To give a little bit of context to my question, I’m doing an automation with the following details:
- I have an Excel file saved on a temporary folder, that came as an attachement from an Outlook eMail
- That file has 5 columns with her own custom format
- I need to generate a new sheet inside that Excel file with only 3 of the columns
- That new sheet, needs to keep the same format from the original sheet.
- That new sheet, however, needs to erase one row that is present on the original sheet
// What have I done so far?
So, basically… I do an #ExcelReadRange where I keep all the values into a certain datatable and then, I use that same datatable to create my new datatable with only the values I want in the new sheet.
dtCellsToRead = dtCellsToRead.Select.CopyToDataTable().DefaultView.ToTable(False, “Devise”, “Acheteur”,“Vendeur”)
dtCellsToRead = dtCellsToRead.Select(“Devise<>‘DZD’”).CopyToDataTable()
All of this works well with the exception of the most important detail: The format is lost!
Any idea of how to workaround this issue?
Thanks in advance.