3 simple bugs with aspose.cells

Last post 08-12-2009, 9:04 AM by powlette. 4 replies.
Sort Posts: Previous Next
  •  08-11-2009, 1:39 PM 192921

    3 simple bugs with aspose.cells .NET

    Here's some code to create a workbook. The three things I've found to not work are data label positioning and fonts and textboxes in xlsx format. When labels are set to OutsideEnd, they're saved as BestFit and the change of font to Arial has no effect. I also cannot get a textbox or label added to the chart in 2007, but does work in 2003. We renewed our license today and are using the latest dll 4.7.1.0

    var workbook = new Workbook();
    var worksheet = workbook.Worksheets[0];

    for (int row = 1; row < 100; ++row)
        worksheet.Cells[row, 0].PutValue(row);

    Chart metricsChart = worksheet.Charts[worksheet.Charts.Add(ChartType.Pie, 1, 1, 30, 15)];
    metricsChart.Title.Text = "Title";
    metricsChart.RightAngleAxes = true;
    metricsChart.PlotArea.Border.IsVisible = false;
    metricsChart.PlotArea.Area.Formatting = FormattingType.None;
    metricsChart.PlotArea.Background = BackgroundMode.Transparent;
    metricsChart.SeriesAxis.IsVisible = true;
    ASeries aseries = metricsChart.NSeries[metricsChart.NSeries.AddR1C1("A10:A20", true)];
    aseries.Name = "Data Series";
    aseries.DataLabels.IsValueShown = true;
    aseries.DataLabels.Area.FillFormat.Pattern = FillPattern.Solid;
    aseries.DataLabels.Area.BackgroundColor = Color.White;
    aseries.Area.InvertIfNegative = true;

    var deltaExplanationTextBox = metricsChart.Shapes.AddTextBoxInChart(500, 500, 1000, 200);
    deltaExplanationTextBox.TextFrame.AutoSize = true;
    deltaExplanationTextBox.Placement = PlacementType.FreeFloating;
    deltaExplanationTextBox.LineFormat.IsVisible = false;
    deltaExplanationTextBox.Text = "Delta  \nExposed -\nControl  ";
    deltaExplanationTextBox.TextHorizontalAlignment = TextAlignmentType.Right;


    // BUG #1 - when saved in Excel2003, height of textbox is not properly set
    // BUG #2 - when saved in Excel2007, textbox is not there

    Aspose.Cells.TextBox textbox0 = metricsChart.Shapes.AddTextBoxInChart(0, 0, 50, 1000);
    textbox0.FillFormat.ForeColor = Color.White;
    textbox0.FillFormat.BackColor = Color.Black;
    textbox0.Text = "Test TextBox";
    for (int i = 0; i < metricsChart.NSeries.Count; i++)
    {
        DataLabels datalabels = metricsChart.NSeries[i].DataLabels;
        // BUG #3 - when saved in Excel2007, labels stay inside of the pie chart and font is not changed
        datalabels.Postion = Aspose.Cells.LabelPositionType.OutsideEnd;
        datalabels.TextFont.Name = "Arial";
    }

    FileFormatType ff = FileFormatType.Excel2007Xlsx;

    string fileName = System.IO.Path.Combine(System.Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory), "test" + (ff == FileFormatType.Excel2007Xlsx ? ".xlsx" : ".xls"));
    workbook.Save(fileName, ff);
    Filed under: aspose.cells bug
     
  •  08-11-2009, 2:29 PM 192939 in reply to 192921

    Re: 3 simple bugs with aspose.cells

    Attachment: Present (inaccessible)

    Hi,

     

    Thank you for considering Aspose.

     

    I checked your mentioned issues with the attached latest version of Aspose.Cells (attached) and I am unable to reproduce them. Please try the attached latest version and let us know if you still face any problem.

     

    Thank You & Best Regards,


    Nausherwan Aslam
    Support Developer,
    Aspose Sialkot Team
    Contact Us
     
  •  08-11-2009, 3:02 PM 192949 in reply to 192939

    Re: 3 simple bugs with aspose.cells

    Dropping that in /bin immediately gives this error. tried downloading it multiple times and unzipping with two different unzip utils. Not sure if it's corrupted or what.

    Server Error in '/' Application.

    is not a valid Win32 application. (Exception from HRESULT: 0x800700C1)

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.BadImageFormatException: is not a valid Win32 application. (Exception from HRESULT: 0x800700C1)

    FYI, this is on Windows 7 / IIS 7

    The dll seems to work on older versions of IIS and from Visual Studio, but not through asp.net

    Also, I'm on 64 bit windows. Could that be the issue?
     
  •  08-12-2009, 12:04 AM 192964 in reply to 192949

    Re: 3 simple bugs with aspose.cells

    Attachment: Present (inaccessible)

    Hi,

     

    Thank you for considering Aspose.

     

    Please try the attached latest version of Aspose.Cells (NET 2.0) and let us know if it works fine for you.

     

    Thank You & Best Regards,


    Nausherwan Aslam
    Support Developer,
    Aspose Sialkot Team
    Contact Us
     
  •  08-12-2009, 9:04 AM 193032 in reply to 192964

    Re: 3 simple bugs with aspose.cells

    It works fine now, thanks.
     
View as RSS news feed in XML