SheetView.OpenExcel method not working properly

Posted by: shinsid on 8 September 2017, 3:21 pm EST

  • Posted 8 September 2017, 3:21 pm EST

    Hello,

    I am trying to use the OpenExcel method with SheetView, but it is not able to import the excel file correctly.

    I am using -

    fpsSpread1.Sheets[0].OpenExcel(filePath, 0);

    See the pictures in attached files-

    Also, Is there any way that i can use 'Open' method with SheetView similar to 'Open' method available with FpSpread class where I can open a spread xml(.bin files) or stream. ?

    Regards
    Siddharth



  • Replied 8 September 2017, 3:21 pm EST

    Hi,

    Could you send us what is in the image as an Excel file? Then we could try loading that file in the current version of Spread.

    There are Open methods in the SheetView class for loading xml files. They are listed in the API section of the help.

    -Gina
  • Replied 8 September 2017, 3:21 pm EST

    Please see the attachment. When I try to import this excel file in Spread using 'SheetView.OpenExcel' method, the borders settings are somehow changed.

    Can you please help to solve this problem?

    Also I have asked one more question in my previous post. Can you please answer that question also?

    Best regards,
    Siddharth
    2015/12/temp.xls
  • Replied 8 September 2017, 3:21 pm EST

    Hi Siddharth,

    Thanks for the excel file.
    We could observe the mentioned behaviour at our end as well. We have forwarded this issue to the concerned team(Tracking ID:140512) for further investigation. We will get back to you as soon as we get any response from them.

    Meanwhile, you can use 'OpenExcel' method of 'FpSpread' instead to load the excel file in Spread:
    fpSpread1.OpenExcel(Application.StartupPath + @"\..\..\temp.xls");

    Using this method, inconsistent border problem doesn't persists. Please refer to the attached sample showing the same.


    Secondly, you can use 'Open' method of SheetView which opens a saved XML file(from File/Stream) in Sheet View:
    http://sphelp.grapecity.com/WebHelp/SpreadNet9/WF/FarPoint.Win.Spread~FarPoint.Win.Spread.SheetView~Open.html

    Hope it helps.
    Best Regards,

    2015/12/ExcelLoadBorderIssue.zip
  • Marked as Answer

    Replied 8 September 2017, 3:21 pm EST

    I included two images of what I see with the current version of Spread. I used the designer to load the Excel file, but the result should be the same as using code.

    Was your other question the one about using an Open method in the SheetView class to load XML files? Or did you mean use a method to load Excel files in the SheetView class?



  • Replied 8 September 2017, 3:21 pm EST

    Hi Siddharth,

    We have received update from the development team.
    In order to show the border correctly, you need to set 'BorderCollapse' property of 'FpSpread' to 'BorderCollapse.Collapse'.
    fpSpread1.BorderCollapse = FarPoint.Win.Spread.BorderCollapse.Collapse;

    This will make spread to display borders for adjacent cells as collapsed into a single border.

    Please refer to the attached modified sample implementing the same.
    Hope it helps.
    Regards,
    Shubham
    2016/01/ExcelLoadBorderIssue_Modified.zip
Need extra support?

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

Learn More

Forum Channels