We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Worksheet object not saving to stream from doc

Hi,

My document file contains a worksheet object, when i read that by below given code and try to save into stream, saved stream's streams.length property shows 0. Means it saves nothing into stream.

Please refer attached doc.

Please do the needful.

Please answer is it possible or not?

Thanks.

Ghanshyam Tomar
M 9920673094

static string GetHtmlDataOfExcelFile(string ExcelLinkName, Document Maindoc)
{
string html = string.Empty;
try
{
MemoryStream FileStream = new MemoryStream();

string extension = string.Empty;
NodeCollection Shapes = Maindoc.GetChildNodes(NodeType.Shape, true);
foreach (Aspose.Words.Drawing.Shape shape in Shapes)
{
if (shape.OleFormat != null)
{
extension = shape.OleFormat.SuggestedExtension.ToString();
if ((extension.Contains(".xls") || extension.Contains(".xlsx")) && shape.OleFormat.IsLink == false)
{
string ExcelName = shape.AlternativeText.Replace("$", "");
if (ExcelName == ExcelLinkName)
{
shape.OleFormat.Save(FileStream); break;
}

}
}
}

Hi Ghanshyam,

Thanks for your inquiry. I have managed to reproduce the same issue at my side. I have logged this issue as WORDSNET-8477 in our issue tracking system. I have linked this forum thread to the same issue and you will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

Hi,


I’ve not notified till yet for my issue, its almost 1 month, you had written me that you logged my issue on no. WORDSNET-8477 in your issue tracking system.

Please resolve it as soon as possible and reply me.

Thanks & Regards,

Ghanshyam Singh Tomar
IRIS
9920673094
Hi Ghanshyam,

Thanks for your inquiry. I have verified the status of WORDSNET-8477 from our issue tracking system and like to share with you that your issue is under development phase. If everything goes by plan, we are very hopeful to include the fix to your issue in Aspose.Words' July release i.e. 13.7.0. Please note that this estimate is not final at the moment; I will be sure to inform you via this forum thread as soon as your issue is resolved. Thanks for your patience.

After you get this fix, please use OleFormat.ProgId and OleFormat.SuggestedExtension properties as shown in following code snippets to save the embedded Excel file with correct file format. The ProgId and SuggestedExtension returns incorrect value that is the reason you are facing this issue.

//Extract OLE object

OleFormat oleFormat = shape.OleFormat;

if (oleFormat.ProgId == "Excel.Sheet.12")

{

oleFormat.Save(String.Format(MyDir + "out_{0}{1}", i, oleFormat.SuggestedExtension));

}

//Extract OLE object

OleFormat oleFormat = shape.OleFormat;

if (oleFormat.ProgId == "Excel.Sheet.8")

{

oleFormat.Save(String.Format(MyDir + "out_{0}{1}", i, oleFormat.SuggestedExtension));

}


Hi Tahir,


Thanks, I am waiting for your next release (Aspose.Words’ July release i.e. 13.7.0)
Please release it as soon as possible.

Thanks & Regards,
Ghanshyam Singh Tomar
IRIS
M 9920673094




Hi Ghanshyam,


Thanks for being patient. We have a good news for you that is WORDSNET-8477 has now been resolved and it’s fix will be included in the next release of Aspose.Words (13.7.0). The next release of Aspose.Words is planned to be released by the end of July 2013. We will inform you via this thread as soon as the new release of Aspose.Words is published.

Best regards,

Thanks!


I am waiting for your reply.


Ghanshyam Tomar
IRIS BLOCKED.
M 9920673094

The issues you have found earlier (filed as WORDSNET-8477) have been fixed in this .NET update and this Java update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.