+ Reply to Thread
Results 1 to 4 of 4

Modify csv data source that is connected to a XLSM file via power query

  1. #1
    Registered User
    Join Date
    06-12-2013
    Location
    Canada
    MS-Off Ver
    Excel 2016
    Posts
    35

    Modify csv data source that is connected to a XLSM file via power query

    Hi there.

    I have developed a SQL script that exports a csv file.

    I have imported this csv file in a .xlsm file and have made pivot tables and other worksheets that are dependent on this table.

    It turns out I forgot to trim the spaces in the custname and need them removed. I have modified my SQL query and produced the corrected csv output.

    However when I refresh the XLSM sheet, those changes do not appear in the XLSM.

    What do I need to do to make this happen?

    I have spoke to so many people about this and they cannot figure it out.

    See attached files.
    Attached Files Attached Files

  2. #2
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    Re: Modify csv data source that is connected to a XLSM file via power query

    these 2 statements totally contradict themselves.
    Quote Originally Posted by TheRevenant View Post
    It turns out I forgot to trim the spaces in the custname and need them removed. I have modified my SQL query and produced the corrected csv output.

    However when I refresh the XLSM sheet, those changes do not appear in the XLSM.
    are you saying that your script DOES trim the data such that there are no spaces BEFORE the CSV is imported into excel, and the data DOES appear in excel WITHOUT spaces in it, then when you refresh the worksheet, the spaces reappear? because that makes no sense whatsoever.

  3. #3
    Registered User
    Join Date
    06-12-2013
    Location
    Canada
    MS-Off Ver
    Excel 2016
    Posts
    35

    Re: Modify csv data source that is connected to a XLSM file via power query

    Initially the CSV was imported with spaces because the SQL did not use RTRIM.

    My SQL script has been edited to perform RTRIM on the field and the exported csv file contains no spaces at the end.

    While the data appears without spaces in the CSV file, when I refresh the data in the XLSM file, the spaces remain.

    I suspect that new records are showing without spaces and old records are showing with spaces.

    I have done TRIM using power query on that specific field and it is okay now.

  4. #4
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    Re: Modify csv data source that is connected to a XLSM file via power query

    Quote Originally Posted by TheRevenant View Post
    it is okay now.
    so have you solved your issue then?

+ 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. [SOLVED] Blank cells in Power Query, data existing in original source
    By kirootsouthpark in forum Excel General
    Replies: 4
    Last Post: 08-25-2020, 05:05 PM
  2. Replies: 0
    Last Post: 08-25-2020, 03:56 PM
  3. [SOLVED] Power Query Only selecetd(parametrs) data to be download from source
    By hudson andrew in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-09-2020, 03:09 PM
  4. Replies: 0
    Last Post: 01-14-2019, 12:59 PM
  5. [SOLVED] Power Query Not loading all Rows from Source File
    By jdriscol in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-21-2017, 04:03 PM
  6. Power Query from Excel source file takes too long
    By MrChipper in forum Excel General
    Replies: 10
    Last Post: 06-28-2017, 04:47 AM
  7. Dropbox Data Host/Source for Power Query
    By mielkew27 in forum Excel General
    Replies: 0
    Last Post: 04-09-2017, 11:49 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