OpenSpreadFile of modified XML file

Posted by: thatrobert on 8 September 2017, 3:00 pm EST

  • Posted 8 September 2017, 3:00 pm EST

    I'm trying to take an XML file generated by Spread Designer and programattically expand it for many more products.  I have no problem using OpenSpreadFile on the Spread Designer file but I get "unable to read beyond the end of the stream" for the expanded file.


    My code is creating new , , and rows.  Is there anything else I need to change?


     Please take a look at my original and created XML files attached.  Thanks.


    2012/09/xml_files.zip
  • Replied 8 September 2017, 3:00 pm EST

    Hello,

    I would like you to know that the OpenSpreadFile method is used to open Spread Com files in the .Net environment. To open an xml file saved from Spread designer you should use the Open method of the FpSpread class i.e used to open a saved xml stream. I tried to open both these xml files, one generated from the Spread designer and the other one that you expanded, using the Open method of the FpSpread class and both the files were opened without any issues. Here is the code to use for the same:

                                    fpSpread1.Open("original.xml");

                                    fpSpread1.Open("created.xml");

    You can refer to the following link for more details about the Open method:

                                   http://www.gcpowertools.com/help/spreadnet6/WF2/spwin-open-spreadxml.html

    Hope it will help you. Please let me know if you have any queries further.

    Thanks,

    Manpreet Kaur

  • Replied 8 September 2017, 3:00 pm EST

    Ah, I thought Open only pulled data, not formatting.  Thank you!
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels