+ Reply to Thread
Results 1 to 4 of 4

Unable write data into .xlsb file

  1. #1
    Registered User
    Join Date
    05-21-2018
    Location
    Hyderabad,India
    MS-Off Ver
    2016
    Posts
    2

    Unable write data into .xlsb file

    Hi Team,

    I have a web application where in after carrying out few steps an excel is generated in .xslb excel format.

    While trying to use get object method to enter data in excel cells which are predefined the data entered is blank.

    Below is the code and attached is the screenshot

    sWebADIFilePath="C:\Users\uk1346\AppData\Local\Microsoft\Office\UnsavedFiles\Book1((Unsaved-306660471733269083)).xlsb"

    Set objExcelbook2 = GetObject(sWebADIFilePath)

    Set objExcelsheet2 = objExcelbook2.Worksheets(sWebADISheetName)

    objExcelsheet2.Cells(8,5) = sLedgerJ

    objExcelsheet2.Cells(9,5) = sCategoryJ

    objExcelsheet2.Cells(10,5) = sCurrencyJ

    objExcelsheet2.Cells(11,5) = sAccountingDateJ

    objExcelsheet2.Cells(12,5) = sJournalName

    objExcelsheet2.Cells(13,5) = sJournalDescriptionO6KBr.png
    Last edited by ujwal kandimalla; 05-21-2018 at 05:37 AM. Reason: Uploaded screenshot

  2. #2
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Unable write data into .xlsb file

    Hi,
    From your screenshot, your code is referring to a different workbook. There is no way to tell if the variables have any value so we can't debug that.
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  3. #3
    Registered User
    Join Date
    05-21-2018
    Location
    Hyderabad,India
    MS-Off Ver
    2016
    Posts
    2

    Re: Unable write data into .xlsb file

    Thanks for your response xlnitwit.Here my sheet name is sheet1. I cannot share the excel as it is our customer confidential one.

  4. #4
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Unable write data into .xlsb file

    I was talking about the workbook name. Your code specifies "C:\Users\uk1346\AppData\Local\Microsoft\Office\UnsavedFiles\Book1((Unsaved-306660471733269083)).xlsb" but your picture shows just an unsaved "Book1", which will have no path or file extension.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 5
    Last Post: 03-19-2018, 02:42 PM
  2. Macro to create a copy of XlSB file and save as XLSX file without any formulas.
    By Mysore in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-28-2016, 03:11 AM
  3. Replies: 0
    Last Post: 01-15-2015, 05:53 AM
  4. [SOLVED] Need VBA Help on MS-Access to generate report & save to xlsb file to tageted file
    By breadwinner in forum Access Programming / VBA / Macros
    Replies: 6
    Last Post: 05-23-2014, 07:52 AM
  5. unable to write data to sheet using currentRegion.Rows.Count
    By sumit dey in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-22-2014, 01:37 AM
  6. Open xlsb file read/write
    By scott.s.fower in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-10-2014, 02:59 PM
  7. Replies: 0
    Last Post: 11-03-2012, 09:10 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1