Forum Discussion
Riley_Johnson
Apr 14, 2024Copper Contributor
Measuring Sheet Size Using VBA
Any ideas to improve this code? This macro is intended to calculate the size of each sheet in Excel. In practice, it will trim fat from a template frequently used at work. For instance, a decisio...
- Apr 15, 2024
Riley_Johnson If the workbook is in xlsx or xlsm format, you could look in the zip container to see the size of each sheet's xml file:
Using my editOpenXML example code you could easily extract the xml of any sheet and measure how large it is by taking the Len of the returned (xml) string. See https://jkp-ads.com/articles/excel2007fileformat02.asp
firdavs375
Apr 15, 2024Copper Contributor
exceel