[CONNECT Update 17 C++] Excel Reader

I notice that the SDK/library folder includes a number of files named ExcelReaderWrapper.xxx.  The MicroStationAPI documentation does not mention Excel.

How do we use those Excel wrapper DLLs?  Any chance of seeing some documentation?

  • Hi  ,

    The MicroStation SDK provides the SteelMaster example that utilizes functionality in the delivered ClosedXML (C++ API) as:

    • Path:  ..\examples\Elements\SteelMaster\ExcelReaderWrapper
    • Make File: ExcelReaderWrapper.mke. // Build to produce native code libraries as follow...
    • Libraries:
      • Dynamic: ..\library\ExcelReaderWrapper.dll
      • Static: ..\library\ExcelReaderWrapper.lib

    That Example Project references and consumes MicroStation's (undoc'd - I will file a Backlog Item for this) ClosedXML (API):

    • Primary MicroStation Library: C:\Program Files\Bentley\MicroStation CONNECT Edition\MicroStation\ClosedXML.dll
    • Header(s): ExcelReaderWrapper.h  // Provides the unpublished (yet useful) declarations ("documentation")
    • Publishes:
      • ReadExcelSheet, ReadExcelSectionTypes
    • Sample Code: ..\examples\Elements\SteelMaster\ExcelReaderWrapper\ExcelReaderWrapper.cpp
      • Calls: findDataStart, convertSystemStrToWString, readExcelSectionTypes, validateExcel, readExcelSheet

    I will reply back here with the Backlog Item for reference.

    Thank you and HTH,
    Bob



    Answer Verified By: Jon Summers 

  • Robert,

    Is this any implementation of ClosedXML any different than what is available on GitHub? We've been using GitHub's version for years within our .NET Ustation addins.

    Thanks,

    Mike

  • Hi  ,

    Yes, MicroStation consumers GitHub ClosedXMLlibraries; currently in MSCE U17.1 (version 0.96) that you can find by examining the ClosedXML.dll version in the MicroStation root folder, like below.

    HTH,
    Bob