This project has moved and is read-only. For the latest updates, please go here.

Calculate total column width from a range

Dec 3, 2013 at 11:04 PM
Edited Dec 4, 2013 at 10:55 AM
hello

What would be the easiest way to calculate the total column with from a range (example A1:H10)?
I have seen xlsx examples with the open xml tool, which defines only two columns. How can i calculate the width of the other ones which are not defined as a column element?

Here is an example:
<x:cols xmlns:x="http://schemas.openxmlformats.org/spreadsheetml/2006/main">
  <x:col min="2" max="4" width="17.85546875" customWidth="1" />
</x:cols>
Column 2 to 4 have 125 pixel length. But if i want to calculate column width from column 1 to 5, how is that possible?
Do i have to consider the page setup to calculate the total width and then subtract those elements from it?

The main goal would be to fit an image into a cell range (example A1:H10). To fullfill this task i have to evaluate the total column width and the total row height. Then i can use these two to create an image with the given pixel size.

Greetings