Black background when merging/adding sheets

Hello,

We are seeing a black background when we generate the report using Aspose.Cells. We are creating two different excel files and later trying to create a consolidate excel file with all. We observed that it works as expected but with black background. To view, we need to manually and explicitly change the background. Below are the other details -

Version being used - Apsose.Cells 7.0.4.5
Attached report
Code -
<!–[if gte mso 9]>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves/>
<w:TrackFormatting/>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>EN-IN</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:EnableOpenTypeKerning/>
<w:DontFlipMirrorIndents/>
<w:OverrideTableStyleHps/>
</w:Compatibility>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
<m:mathPr>
<m:mathFont m:val=“Cambria Math”/>
<m:brkBin m:val=“before”/>
<m:brkBinSub m:val="–"/>
<m:smallFrac m:val=“off”/>
<m:dispDef/>
<m:lMargin m:val=“0”/>
<m:rMargin m:val=“0”/>
<m:defJc m:val=“centerGroup”/>
<m:wrapIndent m:val=“1440”/>
<m:intLim m:val=“subSup”/>
<m:naryLim m:val=“undOvr”/>
</m:mathPr></w:WordDocument>
<![endif]–>

public void ExcelMerge(List<CopyDetails> excelPaths, string labID, string companyID, string strUserName, string companyName)

{

string fileName = companyName + "_" + companyID + "_" + DateTime.Now.Month + "_" + DateTime.Now.Day + "_" + DateTime.Now.Year + "_" + DateTime.Now.Second + "_" + DateTime.Now.Millisecond;

string strPath = this.rootPath + fileName + "Report.xlsx";

FileStream output = File.Create(strPath);

output.Close();

Workbook excelWorkbookFinal = new Workbook(strPath);

for (int i = 0; i < excelPaths.Count; i++)

{

Workbook excelWorkbookToCopy = new Workbook(excelPaths[i].FilePath);

excelWorkbookFinal.Worksheets.Add(excelPaths[i].ShipToAccountNumber);

excelWorkbookFinal.Worksheets[(excelWorkbookFinal.Worksheets.Count - 1)].Copy(excelWorkbookToCopy.Worksheets[0]);

}

excelWorkbookFinal.Worksheets.RemoveAt(0);

MemoryStream streem = new MemoryStream();

excelWorkbookFinal.Save(streem, SaveFormat.Xlsx);

UploadDoc(streem.ToArray(), strUserName, labID, companyID, companyName, ".xlsx");

}

/* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman","serif";}

<![endif]–>

Hi,

Thanks for your posting and using Aspose.Cells for .NET.

Please download and try the latest version Aspose.Cells for .NET 7.5.2 and see if it works fine.

If your problem still occurs, then please provide us your sample runnable project replicating this issue with the latest version. We will look into it and help you asap.

The issue exists with the latest version itself. The original post has the code that can replicate the issue and the generated excel.

Thanks,
Gautham

Hi,

Thanks for your posting and using Aspose.Cells for .NET.

Could you provide us your runnable sample simple project replicating this issue with the latest version? We are not able to compile your code because it gives compile time errors.

Hi Shakeel,

Thanks for your response. I think we have narrowed down the issue and would like to know from you the reason for this behavior. Attached are two reports, the one named as ‘Report’ is normal excel file but the other one named as ‘WindWardReport’ is an xcel file generated from a different product named WindWard. The sample code we have tried is to just open the excel file and save as PDF. And as said, the black background issue is seen only in one of the excel file. Please let us know what could be the cause for this behavior.

<!–[if gte mso 9]>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves/>
<w:TrackFormatting/>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>EN-IN</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:EnableOpenTypeKerning/>
<w:DontFlipMirrorIndents/>
<w:OverrideTableStyleHps/>
</w:Compatibility>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
<m:mathPr>
<m:mathFont m:val=“Cambria Math”/>
<m:brkBin m:val=“before”/>
<m:brkBinSub m:val="–"/>
<m:smallFrac m:val=“off”/>
<m:dispDef/>
<m:lMargin m:val=“0”/>
<m:rMargin m:val=“0”/>
<m:defJc m:val=“centerGroup”/>
<m:wrapIndent m:val=“1440”/>
<m:intLim m:val=“subSup”/>
<m:naryLim m:val=“undOvr”/>
</m:mathPr></w:WordDocument>
<![endif]–>

Workbook book = new Workbook(@"D:\WindWardReport.xlsx");

book.Save(@"D:\WindWardReport.pdf",SaveFormat.Pdf);

/* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman","serif";}

<![endif]–>Thanks

Hi,

Thanks for your posting and using Aspose.Cells.

We were able to observe this issue. The output pdf has black background. We have logged this issue in our database for investigation. We will look into it and resolve this issue. Once, the issue is resolved or we have some other update for you, we will let you know asap.

We have attached the output pdf for your reference.

This issue has been logged as CELLSNET-41933.

Hi,

Thanks for your posting and using Aspose.Cells for .NET.

We have fixed the issue.

Please download and try this fix: Aspose.Cells for .NET v7.5.2.2 and let us know your feedback.

The issues you have found earlier (filed as CELLSNET-41933) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.