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. Image for the cookie policy date
close icon

Save Word Document with Chart

Hi,
Currently I have an issue with my Word document, when I have no chart in the document I can save it without problem with "await document.SaveAsync(file, Syncfusion.DocIO.FormatType.Docx);"
But when I add a chart in my Word document, I have this exception : "Update mode requires a stream with read, write, and seek capabilities".
I tried to use a Stream, MemoryStream and StorageFile but I have the problem with all thoses streams.
I tried to use a document with just a chart and nothing else and I had the same exception.
Is it impossible to use a document with chart ?
Regards,
Charles

6 Replies

SY Sethumanikkam Yogendran Syncfusion Team July 27, 2017 10:14 AM UTC

Hi Molino,

Thank you for contacting Syncfusion support.

We are unable to reproduce the mentioned issue with the given details. Please find the below sample which we have tried at our end to reproduce the issue.
Sample link

Is it impossible to use a document with chart ?
No, it is possible to use document with the chart using Essential DocIO.

Please refer the below link to know more about load and save Word document in UWP.
Working with UWP
Working with Charts

If you’re still facing the same issue means, then kindly provide us sample or modified sample of above along with input template, and product version of Essential Studio which will helpful to reproduce the issue at our end and to provide you the appropriate solution at the earliest.

Please let us know if you have any other questions.

Regards,
Sethumanikkam.Y



MC Molino Charles July 27, 2017 11:25 AM UTC

Hi,

Actually what I am doing is that I load with a FileStream a Template and I do some MailMerge, after that I save it into the LocalFolder.


WordDocument document = new WordDocument();

Stream fileStream = new FileStream("TemplateRapport.docx", FileMode.OpenOrCreate, FileAccess.Read, FileShare.ReadWrite);

document.Open(fileStream, Syncfusion.DocIO.FormatType.Docx);

//Some MailMerge

StorageFolder folder = ApplicationData.Current.LocalFolder;

StorageFile file = await folder.CreateFileAsync("Rapport-"+fiche.reference+".docx", CreationCollisionOption.ReplaceExisting);

await document.SaveAsync(file, Syncfusion.DocIO.FormatType.Docx);

document.Close();


Without the Chart, I have no problem to save it, but when I add a chart manually to my Template I have an exception.


Regards,

Charles




MC Molino Charles July 27, 2017 11:52 AM UTC

Oops I forgot the document.

Here it is.

Regards, 

Charles


Attachment: TemplateRapport2_468c4cdb.rar


SY Sethumanikkam Yogendran Syncfusion Team August 1, 2017 12:17 PM UTC

Hi Molino,

Thank you for contacting Syncfusion support.

A support incident to track the status of your query has been created under your account. Please log on to our support website to check for further updates.

https://www.syncfusion.com/account/login


Please let us know if you have any other questions.

Regards,
Sethumanikkam.Y



MC Molino Charles August 4, 2017 08:42 AM UTC

Hi,

Now that I can save my word document, I have an other problem, when I load it inside a SfRichTextBoxAdv, the chart is not visible.

So I can't print it.

Regars,

Charles



VM Venkatesan Mani Syncfusion Team August 7, 2017 09:43 AM UTC

Hi Molino Charles,

Thank you for your update.

Our SfRichTextBoxAdv control does not supports the chart elements at this moment. We have already logged this requirement as feature request. We will implement these features in any of our forthcoming releases. We usually have a timeframe of at least three months between releases. The feature implementation would also greatly depend on the factors like product design, code compatibility and complexity. We request you to visit our website periodically for feature related updates.

Regards,
Venkatesan M. 


Loader.
Live Chat Icon For mobile
Up arrow icon