Results 1 to 10 of 102

Thread: VBA Copy Rows From One Workbook To text csv File Based On Count In Different Workbook. Cross Posted Chaos

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #11
    Sir Moderator sandy666's Avatar
    Join Date
    May 2018
    Posts
    240
    Rep Power
    8
    Quote Originally Posted by DocAElstein View Post
    Hi Sandy
    Thank you Mr Sandy, Sir, for your interesting contribution to this Thread.,
    I expect vixer has not understood much, due to his appalling grip on the English language, but it has given me some interesting insights into the issues involved.
    Hi Mr Alan Sir
    I gave up
    ---
    I did it with M-code but I really don't know what fixer want as the result

    Code:
    // Sheet1
    let
        Source = Excel.Workbook(File.Contents("D:\test\csvs\3.xlsx"), null, true),
        Sheet1_Sheet = Source{[Item="Sheet1",Kind="Sheet"]}[Data],
        List = Table.AddColumn(Sheet1_Sheet, "Custom", each {1..CNT}),
        Expand = Table.ExpandListColumn(List, "Custom"),
        RC = Table.RemoveColumns(Expand,{"Custom"})
    in
        RC
    
    // CNT
    let
        Source = Excel.Workbook(File.Contents("D:\test\csvs\1.xls"), null, true),
        #"1-Sheet2" = Source{[Name="1-Sheet1"]}[Data],
        Promote = Table.PromoteHeaders(#"1-Sheet2", [PromoteAllScalars=true]),
        Count = Table.RowCount(Promote)
    in
        Count
    Last edited by sandy666; 05-05-2020 at 06:11 PM.
    sandy
    I know you know but I forgot my Crystal Ball and don't know what you know also I may not remember what I did weeks, months or years ago so answer asap. Thinking doesn't hurt

Similar Threads

  1. Replies: 4
    Last Post: 04-10-2014, 10:58 PM
  2. Replies: 2
    Last Post: 09-18-2013, 12:30 AM
  3. TO convert Excel entire workbook in csv format
    By pritee in forum Excel Help
    Replies: 11
    Last Post: 08-16-2013, 11:28 AM
  4. Replies: 4
    Last Post: 06-20-2013, 04:25 PM
  5. Replies: 9
    Last Post: 09-09-2011, 02:30 AM

Tags for this Thread

Posting Permissions

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