Hi Aspose Team,
I am using Aspose.Cells component to convert excel file to tiff.
But i got an excel file which is contains an image attached.
And it is not converting the file to tiff.
Can you please help me on this.
I am attaching the excel file
Please see the code which i am using.
List<string> fullconvertedMultiTiffName = new List<string>();
Workbook workbook = null;
WorksheetCollection sheets = null;
try
{
int sheetCount = 1;
//Initialize a new Workbookworkbook = <span style="color:blue;">new</span> <span style="color:#2b91af;">Workbook</span>(FullInputFileName); <span style="color:green;">//Delete blank rows and columns</span> <span style="color:green;">//Create a Worksheets object with reference to </span> <span style="color:green;">//the sheets of the Workbook.</span> sheets = workbook.Worksheets; <span style="color:blue;">foreach</span> (<span style="color:#2b91af;">Worksheet</span> sheet <span style="color:blue;">in</span> sheets) { <span style="color:green;">//Delete the Blank Rows from the worksheet</span> sheet.Cells.DeleteBlankRows(); <span style="color:green;">//Delete the Blank Columns from the worksheet</span> sheet.Cells.DeleteBlankColumns(); <span style="color:blue;">if</span> (sheet.Cells.Count == 0) <span style="color:blue;">continue</span>; <span style="color:blue;">if</span> (!sheet.IsVisible) <span style="color:blue;">continue</span>; <span style="color:green;">//Apply different Image and Print options </span> <span style="color:#2b91af;">ImageOrPrintOptions</span> options = <span style="color:blue;">new</span> <span style="color:#2b91af;">ImageOrPrintOptions</span>(); <span style="color:green;">//Set Horizontal Resolution</span> options.HorizontalResolution = 200; <span style="color:green;">//Set Vertical Resolution</span> options.VerticalResolution = 200; <span style="color:green;">//Set TiffCompression</span> options.TiffCompression = Aspose.Cells.Rendering.<span style="color:#2b91af;">TiffCompression</span>.CompressionCCITT4; <span style="color:green;">//Set Autofit options</span> options.IsCellAutoFit = <span style="color:blue;">false</span>; <span style="color:green;">//Set Image Format</span> options.ImageFormat = System.Drawing.Imaging.<span style="color:#2b91af;">ImageFormat</span>.Tiff; <span style="color:green;">//Set printing page type</span> options.PrintingPage = <span style="color:#2b91af;">PrintingPageType</span>.Default; <span style="color:green;">//Render the sheet with respect to specified image/print options</span> <span style="color:#2b91af;">SheetRender</span> sr = <span style="color:blue;">new</span> <span style="color:#2b91af;">SheetRender</span>(sheet, options); <span style="color:blue;">string</span> SheetName = <span style="color:#2b91af;">String</span>.Concat(<span style="color:#a31515;">"Sheet"</span>, sheetCount.ToString(), <span style="color:#a31515;">".tiff"</span>); <span style="color:blue;">string</span> FullSheetName = <span style="color:#2b91af;">Path</span>.Combine(<span style="color:#2b91af;">Path</span>.GetDirectoryName(FullInputFileName), SheetName); <span style="color:green;">//Render/save the image for the sheet</span> sr.ToTiff(FullSheetName); fullconvertedMultiTiffName.Add(FullSheetName); sheetCount++;</pre>