cancel
Showing results for 
Search instead for 
Did you mean: 

Saving CSV file as XLSX using MS EXcel VBO (Extended) - it won't work

We have a CSV file which we have opened and edited using the MS EXcel VBO.  We are not able to save it as an XLSX (we have tried several options, the most recent is "Save Workbook As" and have specified the handle, original filename and location and  new filename and location) and are getting the exception "not found in instance 1" (attached).  In our previous pages, we have been able to interact with the csv file.

We are at the start of our development journey and have a suspicion that it's something "obvious"....

36848.jpg
When we have managed to get it to "Save Current Workbook as" and specified the extension of .xlsx.
It does save it with that extension, but when we open it up, Excel says that the document is not in the xlsx format
36849.jpg
 
Ian Meldrum Senior RPA Developer Royal Surrey NHS FT UK
3 REPLIES 3

So basically here you are converting CSV to XLSX.

CSV is a comma delimited text file that we open in Excel so in the backend, it's a kind of text file. Also, CSV files are accessible using text editors. Unlike you can not open XLSX/XLS format files in text editors because those are native Excel files. Both formats has different architecture in the backend meaning that blue prism VBO won't let you save CSV file as native XLSX file.

When you saved in XLSX was like force changing extension but the actual data is still CSV so excel throwing error. Even if you do this manually you'll observe such errors.

However, one approach that I can think of right now is to create a new Excel workbook from excel VBO and copy-paste your CSV data, and then save that XLSX file.

One other way we can give it a try is, Opening the CSV in repair mode and then save the excel with the desired extention.

EVIPUTI
MVP
@Ian_At_RoyalSurrey Utility - Strings, Get CSV as Collection. Than write the collection to Excel using Write Collection.
------------------------------ Vipul Tiwari Senior Process Simplification Developer Amazon ------------------------------