简体   繁体   中英

How can I export data from Excel to png?

I have a set of Excel spreadsheets with multiple tabs which contains each one table that I need to export as pictures in an automated process (I have dozens of such files to process).

While I could "manually" select the table, copy and paste them as image in another software, I need to industrialize this process to save time.

What would be the best approach using .Net or any builtin Excel feature?

Thanks

Check this question. Programmatically (C#) convert Excel to an image

It looks like they're doing what you need?

Think I would use a small C# apop to do it - that assumes that you have a one off task and don't want to mess about with Excel templates or global excel macros and opening each spreadsheets etc.

I would do it like this:

  1. dump all my excel docs in a single folder.
  2. open up each doc in the folder in C# app
  3. iterate each tab
  4. If data capture data for all used ranges (from A1 to the whatever the bottom right cell is) - for any embedded charts pull them off as well
  5. If chart pull it off
  6. dump each to the folder as an image prefixed with the excel doc name and some iterative suffix like _chat01 _data01

How to rwead it ina and convert to image? See here => http://csharp.net-informations.com/excel/csharp-excel-chart-picturebox.htm

  1. Copy all desired cells
  2. Open MS-Paint
  3. Paste
  4. Save as PNG.

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