+ Reply to Thread
Results 1 to 7 of 7

Copying from a closed Jira export csv file to an open Workbook

  1. #1
    Forum Contributor
    Join Date
    10-10-2018
    Location
    Calgary, Canada
    MS-Off Ver
    2016
    Posts
    214

    Copying from a closed Jira export csv file to an open Workbook

    Thanks for helping me.

    I have a wizzbang workbook with lots of code. I haven't yet figured out how to import directly from a Jira query to this workbook, but I have figured out how to take rows from a Jira CSV that has been copied to a worksheet called "Import", to the whizzbang worksheet with lots of features.

    What I want to do is:
    1. Export Jira to some File Name
    2. Click a button which will ask for the Jira export file name
    3. Macro in whizzbang workbook will copy all rows from Worksheet #1 in Jira export file to "Import" worksheet in whizzbang workbook


    I know how to do steps 1 and steps 2, I just don't know how to do step 3.

    I have googled this, and there are examples for copying from the open workbook to a closed workbook, but I haven't found how to copy from a closed workbook to the open workbook.

    Also, the examples given here: http://access-excel.tips/excel-vba-copy-worksheet/ blindly copies worksheets to before and after existing worksheets. i don't want that. I want to copy [some worksheet] to an existing worksheet, not create new worksheets.

    Thanks!!
    Last edited by superlative; 11-07-2018 at 01:28 PM.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Copying from a closed Jira export csv file to an open Workbook

    When you copy from JIRA_export.csv to Import sheet in Wizzbang, will you be replacing all the content there, or adding it after the last row?

    You code will be something like this (but not exactly like this--I would need more details). This copies sheet 1 of the JIRA file to sheet Import of wizzbang, replacing any data that is already there.

    Please Login or Register  to view this content.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Forum Contributor
    Join Date
    10-10-2018
    Location
    Calgary, Canada
    MS-Off Ver
    2016
    Posts
    214

    Re: Copying from a closed Jira export csv file to an open Workbook

    Here is the code I have so far
    Please Login or Register  to view this content.
    The code fails at the red part - can't seem to paste.
    Last edited by 6StringJazzer; 11-07-2018 at 02:08 PM.

  4. #4
    Forum Contributor
    Join Date
    10-10-2018
    Location
    Calgary, Canada
    MS-Off Ver
    2016
    Posts
    214

    Re: Copying from a closed Jira export csv file to an open Workbook

    Quote Originally Posted by 6StringJazzer View Post
    When you copy from JIRA_export.csv to Import sheet in Wizzbang, will you be replacing all the content there, or adding it after the last row?

    You code will be something like this (but not exactly like this--I would need more details). This copies sheet 1 of the JIRA file to sheet Import of wizzbang, replacing any data that is already there.

    Please Login or Register  to view this content.


    Thank-you so much sir!!!! it works. And yes, the import will replace all contents.

    Here is the completed code, modified for my use:

    Please Login or Register  to view this content.
    Last edited by superlative; 11-07-2018 at 02:20 PM.

  5. #5
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Copying from a closed Jira export csv file to an open Workbook

    Moderator's note: Please take the time to review our rules. There aren't many, and they are all important. Rule #2 requires code tags. I have added them for you this time because you are a new member. --6StringJazzer



    Please Login or Register  to view this content.
    Workbook does not have an attribute called FileString. This should not even compile.

    I think what you want is

    Please Login or Register  to view this content.
    I think your problem is that when you ClearContents, it clears the clipboard and your Copy is lost.

    Also you do not have to Select the destination before you paste to it. In fact, you can copy and paste all in one call.

    I would do the rest of it like this:
    Please Login or Register  to view this content.

  6. #6
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Copying from a closed Jira export csv file to an open Workbook

    We crossed in the mail. You still have one problem.

    Please Login or Register  to view this content.
    Do not use quotes around False here, and FileStr must be declared as Variant.

  7. #7
    Forum Contributor
    Join Date
    10-10-2018
    Location
    Calgary, Canada
    MS-Off Ver
    2016
    Posts
    214

    Re: Copying from a closed Jira export csv file to an open Workbook

    Quote Originally Posted by 6StringJazzer View Post
    We crossed in the mail. You still have one problem.

    Please Login or Register  to view this content.
    Do not use quotes around False here, and FileStr must be declared as Variant.
    Gotcha!! Thanks. I had defined a global variable called "FileString", that's why i was using thisworkbook.filestring, but it was redundant, so I have changed it to what you said. THANK-YOU!!!

+ 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. VBA export sheets from open workbook to closed workbooks
    By wannabeexcelguy in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-03-2015, 10:18 AM
  2. [SOLVED] Copying emf Object from closed workbook into open workbook
    By sur4j in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-28-2014, 03:44 AM
  3. Copying data from a closed workbook to an open one
    By buttonmasher in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-08-2013, 11:20 AM
  4. [SOLVED] Copying data from a closed workbook into an open workbook ignoring excel filter?
    By reach78 in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 09-17-2013, 12:31 AM
  5. Replies: 12
    Last Post: 07-03-2013, 01:35 PM
  6. [SOLVED] Copying specific rows from an open workbook into the next row of a closed workbook.
    By Deimola in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-05-2012, 12:59 PM
  7. VBA Copying data on closed sheet to open Workbook.
    By Mase123y in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 07-20-2009, 12:21 PM

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