We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

saving multi sheet with chart on every sheet

Thread ID:

Created:

Updated:

Platform:

Replies:

73003 Apr 15,2008 08:11 PM UTC May 26,2008 07:01 AM UTC WinForms 8
loading
Tags: Chart
Sanir Cosovic
Asked On April 15, 2008 08:11 PM UTC

Hi,
I'll try to explain this as well as I can.

I have a workbook with few sheets holding a GridControl. Each sheet has an embedded chart control on it. ChartLegend is on the left hand side of the ChartArea and chart itself is on the right of the ChartArea. When I save this to Excel or PDF, I export chart as image.

My problem is: Grid saves fine, as well as the chart on the visible sheet. Everything on this sheet/page is saved correctly.

On other invisible sheets, images of charts are not saved as the chart appears on its sheet. Chart is stretched over the whole chart area and ChartLengend is squeezed on the left hand side and totally unreadable.

If I have other sheet visible, the same thing. It is saved correctly and other sheets have the same issue.

I believe it has to do with chart being visible/invisible in the moment of saving.

I'd appreciate somebody letting me know if there is a work around this issue.

Thanks...



Yavanaarasi G [Syncfusion]
Replied On April 21, 2008 08:47 AM UTC

Hi Samko,

Sorry for the delay in responding.

I am not able to reproduce the issue that you mentioned here. I have created a simple sample and exporting a chart as an image to excel with multi sheet. Here the chart is not stretched. Please refer the below code snippet:


[C#]
Image img = new Bitmap(this.chartControl1.Width, this.chartControl1.Height);
this.chartControl1.Draw(img);
//Insert Image
mySheet.Pictures.AddPicture(1, 1, img);


Here is the sample for your reference:

http://websamples.syncfusion.com//samples/XlsIO.Windows/73003/main.htm


Please have a look at the above sample and if still the issue exists, could you please try reproducing it in the above sample and send us the modified sample so that we could sort out the cause of the issue and provide you a solution?

Regards,
G.Yavana




Sanir Cosovic
Replied On May 12, 2008 01:22 PM UTC

Hello,
Thanks for responding. I don't think that you sample exactly matches my problem. Your chart is already visible and rendered. You're just creating multi sheet workbook and then put the visible chart in every sheet.

What I have is multi sheet workbook with chart in each of the sheets. Only one is visible at the time. So when I save my workbook to Excel, only visible sheet saves its chart correctly. Other charts on invisible sheets are as per images in my first message.

Please try this and let me know. I'd appreciate it a lot.

Thanks...


Yavanaarasi G [Syncfusion]
Replied On May 13, 2008 10:14 AM UTC

Hi Samko,

I am not able to understand your query. Could you please try to send your sample for understand the issue so that we provide you a better solution?

Regards,
G.Yavana


Sanir Cosovic
Replied On May 13, 2008 07:06 PM UTC

Hello,
Here is the simple example.

Charts are created on all three sheets. But when I save it to the Excel file as an image, legend is gone, title is gone, size of the image is not the same as the size of the actual chart control.

I'd appreciate your help.

Thanks...



CS.zip

Yavanaarasi G [Syncfusion]
Replied On May 16, 2008 12:55 PM UTC

Hi Samko,

Sorry for the delay in responding.

I am able to see the issue. But the issue is reproduced not because of XlsIO. By default the image can be rendered like that. I have save the image separately and check it. It looks different from the chartcontrol. This happens the problem.

Here is the screenshot:

http://websamples.syncfusion.com/samples/Image.png

Please try to save the image and check and let me know if you have any other concerns.

Regards,
G.Yavana


Sanir Cosovic
Replied On May 16, 2008 07:17 PM UTC

Hello,
Thanks for reply.

I'm seeing exactly the same image.

How can I work around it to be able to save it as it shows? I need my legend to be displayed outside the chart at the certain position and chart area to be sized as seen in the program when created and before the saving it to the file.

I appreciate your help.

Thanks..


Sanir Cosovic
Replied On May 22, 2008 01:44 PM UTC

Any news.

Please it is very important for me to save this as the chart shows.

Thanks...


Jisha Joy [Syncfusion]
Replied On May 26, 2008 07:01 AM UTC

Hi Samko,

Please refer the following forum thread that shows how to export chart to the xls file along with the grid.

http://www.syncfusion.com/Support/Forums/message.aspx?&MessageID=52502


Regards,
Jisha


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;