shilpareddy
New Member
Can you please share th information about how to convert excel to csv in blue prism.
The above post already has the answers to both of your questions. Re-pasting them here belowhi VJ
for the above, save the excel file into CSV format file
we do action stage Save workbook as , and how do we write in the Filename property ?
let's say the excel file filepath: C\Documents\staffmanagement.xlsx
how do we write in the filename to turn it (save it) into csv file ?
View attachment 1371
Hi YGC,Hi VJR, your solution works perfectly fine.
The only thing, when I transform my excel to xlCSV format (as I show in next picture). The last line ends with a comma. Is there anyway to avoid the last comma? or remove it using blueprism but without importing the excel file as a collection and looping line by line removing the last comma?
View attachment 1804
Thank you very much in advance.
Hi VJR,Hi YGC,
How does the original Excel look like? Does it have any invisible character like a space or a tab in the last column because of which it is automatically adding a comma at the end?
Some bordered cell formatting seems to be visible in the column N. Perhaps data was present there earlier and was deleted later in which case Excel considers it as having data OR only bordering is present without any data. In any case if that entire column is deleted (not removing of formatting) and if you are still getting the last comma do post back.Hi VJR,
The original excel look like in the picture attached here. I can't perceive anything unusual. Do you?
Could be the extra column?
-YG
View attachment 1811
Some bordered cell formatting seems to be visible in the column N. Perhaps data was present there earlier and was deleted later in which case Excel considers it as having data OR only bordering is present without any data. In any case if that entire column is deleted (not removing of formatting) and if you are still getting the last comma do post back.
Hi VJR,Hi shilpareddy,
- Simply make a copy of the existing 'Save Workbook As' action tab of the MS Excel VBO.
- Rename it as 'Save Workbook As CSV'
- Go to the Code stage and modify the below marked in bold
wb.SaveAs(filename,6)
6 is the numeric constant for xlCSV FileFormat.
- Publish your new action
- From the process when you pass the 'Filename' Input parameter pass it with the .csv extension
"c:\MyFileName.csv"
- After you run the process you will see the Input/Output as below
View attachment 716
Hi,Hi shilpareddy,
- Simply make a copy of the existing 'Save Workbook As' action tab of the MS Excel VBO.
- Rename it as 'Save Workbook As CSV'
- Go to the Code stage and modify the below marked in bold
wb.SaveAs(filename,6)
6 is the numeric constant for xlCSV FileFormat.
- Publish your new action
- From the process when you pass the 'Filename' Input parameter pass it with the .csv extension
"c:\MyFileName.csv"
- After you run the process you will see the Input/Output as below
View attachment 716
Hi ,Hi VJR,
I need to ask you something related to this case. I want to save workbook as "Text(Tab Delimited)" format. Do you know how can i do this ? I couldnt find the numeric constant for this format. Thank you for your help
The wb.SaveAs() method does not support conversion to PDF.Hi
Can you please share the information about how to convert Excel to PDF in Blue Prism. What number we can use in place of 6 for PDF.
"wb.SaveAs(filename,6)"
HiThe wb.SaveAs() method does not support conversion to PDF.
Use ExportAsFixedFormat() method. Refer : https://docs.microsoft.com/en-us/office/vba/api/excel.workbook.exportasfixedformat
If you are not comfortable with coding, follow the attached document that I found on the BP forums