简体   繁体   中英

Create charts in excel sheet [ in same sheet along with data C#]

Can we create charts in excel sheet passing data directly from datatable and then bind baar and pie charts with data and on the same sheet can also have many other values in different cells passed by c# code.

Please see attached image for clear view.

Thanks w

It's unfortunately not that easy :(. You need to use the OpenXMLSDK. The best way is to create a template excel file with charts in it and write data to the excel sheets, then set the data range of the charts to the data section.

OpenSDK-Download: http://www.microsoft.com/en-us/download/details.aspx?id=5124

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM