I have an issue ever since upgrading to the newest version of aspose.cells. For the last chart that is created from the data. It pushes all the data together on the category axis of the chart. I have loaded examples of what I’m talking about. Did or does anybody else have this same issue? I have noticed that it only happens on the last page of multiple charts or on the report that only has 1 chart.
Hi,
Amjad,
Hi Shawn,
Amjad,
I found something out what might be causing the issue. Here is my code that sets the tick mark and label values.
oChart.CategoryAxis.TickLabels.NumberFormat = "MM/dd/yy HH:mm"
oChart.CategoryAxis.TickLabelSpacing = CType((CHART_MINUTE_INTERVAL / 24), Int32)
oChart.CategoryAxis.TickMarkSpacing = CType((CHART_MINUTE_INTERVAL / 24), Int32)
oChart.CategoryAxis.MajorTickMark = Charts.TickMarkType.Cross
oChart.CategoryAxis.TickLabels.Font.Size = 8
oChart.CategoryAxis.TickLabels.Offset = 100
oChart.CategoryAxis.TickLabels.RotationAngle = 45
oChart.CategoryAxis.CategoryType = Charts.CategoryType.CategoryScale
oChart.CategoryAxis.MajorGridLines.IsVisible = True
oChart.CategoryAxis.MajorGridLines.Style = Drawing.LineType.Solid
The ticklabelspacing and tickmarkspacing are both set to 60 when the code is generates the value. But when going into the settings on the excel document I see 2 different results. I'm attaching screen shots of the properties of each excel document. You will see that I get 2 different results in the setting with the same code. Is this an excel issue or is this an aspose issue? Now these 2 PCs have the same version of excel on them.
Thank you,
Shawn
Hi Shawn,
Amjad,
Here is the excel files from both pcs.
Shawn
Amajd,
I found something else out. In my code I was still using SaveFormat.Excel97To2003 as my format. I changed my code to use Xlsx as my format and everything looks good except for gettting this message. I think I resolved the pushing of the data together but how to I resolve the error message I keep on getting? Here is my code for that part of the process.
outputFileName = job & "." & workOrder & "." & beam.Replace(",", "-").Replace(" ", "") & "." & steamLine & "." & valve & ".xlsx"
oExcel.Save(memoryStream, SaveFormat.Xlsx)
Me.Response.ContentType = "vnd.openxmlformats(-officedocument.spreadsheetml.sheet)"
Me.Response.AddHeader("Content-Disposition", "Attachment; filename=" & outputFileName)
bytebuffer = memoryStream.GetBuffer()
Me.Response.OutputStream.Write(bytebuffer, 0, bytebuffer.Length)
Me.Response.Flush()
Me.Response.End()
Thank you,
Shawn
Hi,
AutomationNESL:I found something else out. In my code I was still using SaveFormat.Excel97To2003 as my format. I changed my code to use Xlsx as my format and everything looks good except for gettting this message. I think I resolved the pushing of the data together but how to I resolve the error message I keep on getting? Here is my code for that part of the process.
outputFileName = job & "." & workOrder & "." & beam.Replace(",", "-").Replace(" ", "") & "." & steamLine & "." & valve & ".xlsx"
oExcel.Save(memoryStream, SaveFormat.Xlsx)
Me.Response.ContentType = "vnd.openxmlformats(-officedocument.spreadsheetml.sheet)"
Me.Response.AddHeader("Content-Disposition", "Attachment; filename=" & outputFileName)
bytebuffer = memoryStream.GetBuffer()
Me.Response.OutputStream.Write(bytebuffer, 0, bytebuffer.Length)
Me.Response.Flush()
Me.Response.End()
Please try our latest version/fix: Aspose.Cells for .NET v7.3.2.1
//Save in xlsx format and send the file to user so that he may open the file in //some application or save it to some location oExcel.Save(this.Response, "Report.xlsx", ContentDisposition.Attachment, new OoxmlSaveOptions()); Response.End();
Amjad,
I did what you suggested and everything worked correctly. Thank you for the help.
Shawn
Hi Shawn,