Page 1 of 1

"ConvertFile" only coverts last sheet of Excel file

Posted: Mon Dec 09, 2013 5:12 am
by ahsan
Hi staff,

"ConvertFile" only coverts last sheet of Excel file. I am running ASP.Net sample provided in sdk on this path "print2flashsdk\Automation\Samples\ASP.NET".

Code: Select all

 int interfaceOptions = 0;
            for (int i = 0; i < cblDocOptions.Items.Count; i++)
                if (cblDocOptions.Items[i].Selected)
                    interfaceOptions |= Int32.Parse(cblDocOptions.Items[i].Value);

            Print2Flash3.Server2 p2fServer = new Print2Flash3.Server2();
            p2fServer.DefaultProfile.InterfaceOptions = interfaceOptions;
            p2fServer.DefaultProfile.ProtectionOptions = (int)Print2Flash3.PROTECTION_OPTION.PROTENAPI;
            p2fServer.ConvertFile(fs_filename, fs_convertedfilename, null, null, null);
            Label1.Text += "File converted.";
            swfUrl = "ConvertedFiles/" + FileUpload1.FileName + ".swf";

Re: "ConvertFile" only coverts last sheet of Excel file

Posted: Mon Dec 09, 2013 5:33 am
by staff
In order to convert multiple sheets, you need to turn on special processing method for MS Excel as we described in this forum topic: viewtopic.php?f=4&t=4773

Re: "ConvertFile" only coverts last sheet of Excel file

Posted: Mon Dec 09, 2013 8:57 am
by ahsan
staff wrote:In order to convert multiple sheets, you need to turn on special processing method for MS Excel as we described in this forum topic: viewtopic.php?f=4&t=4773
I just make a simple application having just two lines of code.

Code: Select all

Print2Flash3.Server2 p2fServer = new Print2Flash3.Server2();
 p2fServer.ConvertFile("d:\\sample.xlsx", "d:\\sample.swf", null, null, null);
This converts all the sheets and skipped the empty sheet.

Problem solved but with no understanding of the solution.