We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

How do you maniplulate the heading in .net to reflect new heading in excel

I am creating a report in .net and exporting the output to excel. My business user requested to alter the heading in the excel to also include the country where the currency is coming from. To simplify, in my excel report I have 3 headings that was coded in .net as
worksheet.Cells[“A1”].putvalue(“company”);
worksheet.Cells[“A2”].putvalue(“tradedate”);
worksheet.Cells[“A3”].putvalue(“currency”);
My user wants me to take the value of the field country in my database and put it below the word currency in the heading. So the heading currency will take up 2 lines. If the currency is US, the heading will show currency on top and (USD) right below currency. My question is how do I take the value of country and add it below the heading currency? Thank you

Hi,

Well, using your own code, you have to first obtain/ get data (you may use your own ADO.NET code etc.) to first fetch it and fill it to some container like variables, Arrays/ List or datatable etc., then you may use Aspose.Cells APIs to insert data to your desired worksheet cells (e.g via using Cell.PutValue() method) in the worksheet, see the documents for your complete reference here:
http://www.aspose.com/docs/display/cellsnet/Adding+Data+to+Cells
http://www.aspose.com/docs/display/cellsnet/Importing+Data+to+Worksheets

Thank you.