.net- open excel file, format the file and save
- by Lock
I have an ASP web service that uses the Crystal Reports API to download an Excel report. Now, there is a few things I do not like about the Excel report that Crystal generates: - The column widths are static (as in they are not adjusted for the content). - I can't format the header row to be bold - If I suppress a data column in the report, it comes out in the Excel spreadsheet as a blank column.
I currently use PHP to open the excel file, autosize the columns, bold the heading and remove blank columns, although using the PHPExcel class for this doesn't work well when the spreadsheet is only a few 100kb in size.
I am thinking if I move this activity into the .NET web service, the performance will be much better.
Does anyone know an efficient way of opening a Excel file and performing the operations listed above?