Hi!
We have a problem about saving xlsx file with converting headerfooter.
I attached original file and erroring file.
Our customer has a this problem. But we can’t catch the problem at our system.
Our customer, why might has this problem ?
Could you please check it ?
Hi,
Thanks for the template files.
Could you please try our latest version/fix if it makes any difference.
Aspose.Cells for .NET (Latest Version)
Also, I am afraid, we might not evaluate your issue properly (based on template (error) file) as we need to reproduce the issue on our end for thorough analysis. So, kindly do create a simple sample console application (runnable), zip it and post us here with all the resource files, we will check it soon. If we found the issue, we will log a ticket for it into our database.
Thank you.
Hi,
Hi,
Hi,
We write the following data in the header part.
Left
&“Arial” &10
&“0” &0
&“0” &0
&“0” &0
&“0” &0
Bottom
&“Arial” &10 PINAR ENTEGRE ET VE UN SAN. A.Ş.
&“Arial” &10 MCD DANA KUZU HAMBURGER KÖFTESİ ( 7:1 ) ÜRETİM KONTROL FORMU
&“0” &0
&“0” &0
&“0” &0
Right
&8 Dok. Kodu: MCD.K.F.014
&8 Rev. No: 1
&8 Rev. Tar: 1.10.2015 16:54:30
&8 Hazırlama Tarihi: 1.10.2015 16:54:30
&8 Sayfa No: 1
But we take this error.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>error109720_02.xmlErrors were detected in file ’http://qdmsv515.bimser.local/QDMSFiles/TEMPFOL/[ POLITIKA-0063 ] 34a8147f-5182-405f-aa6a-4fe01897f459 [ POLITIKA-0063_0.xlsx ] [ 0 ].xlsx’Excel completed file level validation and repair. Some parts of this workbook may have been repaired or discarded.Removed Records: Worksheet properties from /xl/worksheets/sheet1.xml part
Our code is:
for (int i = 0; i < 3; i++)
{
Aspose.Cells.PageSetup pageSetup = sheet.PageSetup;
pageSetup.SetHeader(i, yazılacakbilgi);
}
logo insert code :
sheet.PageSetup.SetHeaderPicture(j, buffer);
sheet.PageSetup.SetHeader(j, “&G”);
We are waiting for your solution.
Thanks.
Hi,
Worksheet ws = wb.Worksheets[0];
PageSetup ps = ws.PageSetup;
string path = @“E:\test2\pic1.jpg”;
FileStream inFile = new System.IO.FileStream(path, System.IO.FileMode.Open, System.IO.FileAccess.Read);
byte[] binaryData = new Byte[inFile.Length];
long bytesRead = inFile.Read(binaryData, 0, (int)inFile.Length);
ps.SetHeaderPicture(0, binaryData);
ps.SetHeader(0, “&G”);
ps.SetHeader(1, “PINAR ENTEGRE ET VE UN SAN. A.S.\nMCD DANA KUZU HAMBURGER KÖFTESI ( 7:1 ) ÜRETIM KONTROL FORMU&“0,Regular” &1”);
ps.SetHeader(2, “&8 Dok. Kodu: MCD.K.F.014\nRev. No: 1\nRev. Tar: 1.10.2015\nHazirlama Tarihi: 1.10.2015\nSayfa No: 1”);
wb.Save(“e:\test2\out1.xlsx”);