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]–>