My use case is generate excel file from data extracted from tests like DB Tool or Extension tool. Can someone help?
After extracting the data to a csv file, I believe simply changing the extension from .csv to .xls or .xlsx could suffice. You could follow the steps provided in this post and then write a short script to rename/reformat the .csv file to your desired excel format.
Thanks much Omar, but my biggest worry is CSV only carry value separated by Comma where as my excel file do have color coding and certain format which allows in excel not CSV, how to handle that?
Omar if you mean to rename the file like ren "filename.csv" "filename.xls" it's not converting into right format of Excel and showing below message... if you can explain in details would be great.
If you want to automatically generate an Excel file which has specific formatting, simply converting from CSV to Excel will not support that. You would need to write your own code using some library like Apache POI to generate the Excel file with the behavior that you desire.
Unfortunately I don't have a specific example I have written that I can show you - but you can take a look here: https://poi.apache.org/spreadsheet/how-to.html
again, thanks much @jakubiak