Variation in the Size of the output SVG image out of Named ranges and Images in excel file


#1

Dear Sir,

I have a concern regarding the output SVG image which is varying in its size by a margin, even though it’s dependent Named renges in Excel files are almost of the same number of rows and columns. The same concern is regarding the images saved in Excel File.

My Concern is described as follows:

  1. Variation of size (width and height) of the output SVG image out of Image saved in Excel File:
    When I have an Image stored in Excel file, with the name as ‘CoverTable_1’, and I m trying to read that image using Aspose.Cells and converting that into SVG image file, it’s size in terms of height and width is varying image by image.
    Attaching two Excel files for your reference.
    ExcelFile1.zip (685.3 KB)
    ExcelFile2.zip (424.5 KB)
    and also the c# code to convert the named ranges and images into SVG
    AsposeCode.zip (1.5 KB)
    The attached file “Copy of Siemens - 4QFY18 - exhibits.xlsx” has image with name ‘CoverTable_1’ and two named ranges ‘Ex_1’ and ‘Ex_2’.
    The problem is that, the output SVG image of CoverTable_1 has very small size(in terms of width and height) as compared to the size of the Image ‘CoverTable_1’ in the other Excel file (“UTCEM_2QFY19.xlsx”) attached herewith.

  2. Variation in the size (height and width) of output SVG image out of named ranges of Excel file:
    The attached file “Copy of Siemens - 4QFY18 - exhibits.xlsx” has two named ranges “Ex_1” and “Ex_2”. Both have almost the same number of rows and columns. But, when I am using the attached code that uses Aspose.Cells to read the named ranges and convert them into SVG image, they are varying in the size by a margin in terms of height and width.

So, I am expecting the consistent size of all the images, charts and named ranges for the output SVG image (depending upon the size of the relevant images, named ranges and charts in Excel).
To be specific, Ex_2 has the proper readable size and the same I am expecting to be implemented for Ex_1.
Also, CoverTable_1 from “UTCEM_2QFY19.xlsx” has the proper readable size, but CoverTable_1 from “Copy of Siemens - 4QFY18 - exhibits.xlsx” has very small size, which is supposed to be equivalent to the image in Excel.

Kindly, provide me the solution as soon as possible.

Thanks and Regards


#2

@yogeshrawle,

Thanks for your query.

We were able to observe the issue but we need to look into it more. We have logged the issue in our database for investigation and for a fix. Once, we will have some news for you, we will update you in this topic.

This issue has been logged as

CELLSNET-46457 - Inconsistent image size when named range converted to SVG

#3

@ahsaniqbalsidiqui

Dear Sir,
Thank you very much for your quick action.
Awaiting for your update.

Thanks and Regards


#4

@yogeshrawle,

Please spare us little time (3-5 days), so we could evaluate your issue precisely. Hopefully your issue will be fixed soon.

Once we have an update on it, we will let you know here.


#5

@yogeshrawle,

We evaluated your issue further. Your issue is due to the fact that the sheet zoom of the sheet “Results” in the file “Copy of Siemens - 4QFY18 - exhibits.xlsx” is set to 54%, kindly set it to 100%, everything will be ok.
e.g
Sample code:

..........
public static List<string> ReadExcelImages(string file, string outputDirectory)
        {
            try
            {
                String dataDir = file;

                Workbook workbook = new Workbook(file);
                List<string> names = new List<string>();
                List<string> displayNames = new List<string>();
                List<string> sortedNames = new List<string>();
                bool flag = false;
                foreach (Worksheet worksheet in workbook.Worksheets)
                {
                    worksheet.PageSetup.Zoom = 100;
                    ..... 

Hope, this helps a bit.


#6

@Amjad_Sahi

Dear Sir,

Thank you very much for your help. It’s working fine for me now.
Thanks a lot.

Regards


#7

@yogeshrawle,

Good to know that your issue is sorted out by the suggested code segment. Feel free to contact us any time if you need further help or have some other issue or queries, we will be happy to assist you soon.