none
Add custom properties to ".xlsb" files using openxml sdk in VB.net/C#.net RRS feed

  • Question

  • Hi,

    I am creating an asp.net application which adds custom properties in office documents.

    I am using open xml sdk dll for adding custom properties for xlsm, xlsx files.

    I am using SpreadSheetDocument.open (..)  for adding custom properties.

    But i am not able to add custom properties in .XLSB files using SpreadSheetDocument.open (..)

    Is there any other way of adding custom properties from .xlsb

    XLSM and XLSX are working fine using SpreadSheetDocument.open (..)

    Please help and suggest how can i add custom properties in .XLSB files using openxml sdk package dlls.

    or any other class would be fine.

    I also have tried using dsofile dll. But on servers it is giving issues with office 2007 and above formats.

    Friday, April 25, 2014 3:26 PM

Answers

  • Hi,

    .xlsb means this is an Excel Binary Workbook, we can’t use OpenXML SDK to open it since it is not a file with open xml file formats.

    We can use Office PIA to convert this .xlsb file to .xlsm or, xlsx, but it need to install Office on the server and Microsoft doesn’t recommend us to use Office PIA on the server. For more information, please refer to Considerations for server-side Automation of Office.

    Suppose this xlsb file was uploaded from web, I would suggest you converting this file (Save as feature) to open xml file formats (e.g. .xlsm, .xlsx files) manually before uploading.

    In addition, to add custom properties, here is an article for your reference:

    Setting Custom Properties in Word 2010 Documents by Using the Open XML SDK 2.0

    Hope this helps.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, April 28, 2014 8:00 AM
    Moderator