Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • excel binary file (.xlsb)

    Dear stata users,

    is there a way to import excel binary file into stata?
    Thank you very much for your help.

    F

  • #2
    Dear All,

    I'm sorry for bumping this old question, but I use often this format and I couldn't find any solutions neither on Statalist nor with Google. Usually I get a "worksheet XYZ not found" error or an empty dataset with import excel. Is/Will be this file format supported?
    Thanks!

    Kazi

    Comment


    • #3
      See here:
      http://www.stata.com/statalist/archi.../msg01651.html

      Using .xlsb format imposes compatibility and portability constraints as per:
      http://analystcave.com/excel-working...e-xlsb-format/

      Resume: open in Excel and save as .xlsx

      Best, Sergiy

      Comment


      • #4
        The xlsb format is really useful when you need to handle big files (as it is written in the article you sent). But I couldn't get the meaning of the StataList thread. Is there an ODBC workaround?

        Comment


        • #5
          Yes, this is the by-design function of ODBC. See here for steps.
          Best, Sergiy

          Comment


          • #6
            Thank you very much indeed!

            Comment


            • #7
              Just a quick follow up on this issue, to have all information in one place.
              I haven't had the proper Microsoft ODBC driver installed, see it here: https://www.microsoft.com/en-us/down....aspx?id=13255
              If you would like to switch among files without clicking, you can do it with the following command:
              Code:
              winexec odbcconf configdsn "Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)" "dsn=NameOfYourConnection|dbq=C:\example.xlsb"
              Or you can use this if you would like to avoid setting up a connection:
              Code:
              odbc load, table(NameOfYourSheet$) connectionstring("DRIVER=Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb);dbq=C:\example.xlsb")
              If you have tricky characters in the name of your sheet, use quotes, and use the clear option to save a clear all...

              Comment

              Working...
              X