Solved

.txt Formatting

Posted on 2013-12-30
14
232 Views
Last Modified: 2013-12-31
Hi Experts,

Need Code For This Process.
There are 2 workbooks Uploader & Downloader. Want to create text file in specific format. So process is from download workbook – from Sheet “Start” To “Finish” Uploader workbook copy data one by one & create text file for each sheet from Downloader.

On Click Of Button “Create” - in workbook Uploader – Data

01.

Copy Data from workbook “Downloader” From very 1st sheet after Sheet name “Start” & past to workbook – Uploader – Data – Cell A1.

02.

Count Data range from Cell A2 to till end (ctrl+Shift+Downarrow).

03.

Assume there is Count 500 then in sheet Text copy formula from A2 & past till A499.

04.

Select All and create .txt file with name Workbook – Uploader – Data – C3 & save file in same location. (If same name exist then over past)

05.

Step 5 Next Sheets till Sheet “Finish”.

06.

End

Thank You
Downloader.xlsx
Uploader.xlsm
0
Comment
Question by:itjockey
  • 9
  • 5
14 Comments
 
LVL 39

Expert Comment

by:als315
ID: 39747688
Look at sample
Uploader1.xlsm
0
 
LVL 8

Author Comment

by:itjockey
ID: 39747753
Mr.als315,

There is 7 sheets in Uploader & 2 are identical so final result must be 6 .txt file but in this it create only one with all data in it.& it names "Workboot-Uploader—Data-C3" but it should be from workbook - sheet data - Cell C3. which is ACC LTD.


Thanks
0
 
LVL 39

Accepted Solution

by:
als315 earned 500 total points
ID: 39747807
Naming was not clear. Can you show examples of file names? Should I take names from C1 cell in worksheets in Downloader.xlsx file?
Uploader2.xlsm
0
 
LVL 8

Author Comment

by:itjockey
ID: 39747814
Yes i.e. .txt 1 to 6   like this ACC LTD, AMBUJA CEMENTS, ASIAN PAINTS LTD, AXIS BANK LTD, BAJAJ AUTO LTD, BANK OF BARODA.



Thanks
0
 
LVL 39

Expert Comment

by:als315
ID: 39747819
Try sample Uploader2 from comment above
0
 
LVL 8

Author Comment

by:itjockey
ID: 39747828
Sorry I dint see attachment.......yes so far working fine...super cool.   :) I am closing question but just in case if required I will ask you in this window only thanks
0
 
LVL 8

Author Closing Comment

by:itjockey
ID: 39747829
Thanks & Thanks For Promptness .....& Happy New Year.   :)
0
Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
LVL 8

Author Comment

by:itjockey
ID: 39747966
May I get some little help on same question?
0
 
LVL 8

Author Comment

by:itjockey
ID: 39747977
Mr.als315,

Need one more line in code - while transition from Downloader to Uploader workbook there is "#N/A N/A" in many cells, want to replace that with "0" i.e. Numerical value zero.



Possible ..?

Thanks
0
 
LVL 39

Expert Comment

by:als315
ID: 39747979
Possible, but can you show sample?
0
 
LVL 8

Author Comment

by:itjockey
ID: 39747993
Mr.als315,


Sure pls see attached file..



Thanks
Downloader.xlsx
0
 
LVL 39

Expert Comment

by:als315
ID: 39748015
Change For cycle to:
            For j = Asc("B") To Asc("G")
                If InStr(1, wsu.Range(Chr(j) & i), "#") = 1 Then
                    Str = Str & ",0"
                Else
                    Str = Str & "," & wsu.Range(Chr(j) & i)
                End If
            Next j

Open in new window

0
 
LVL 8

Author Comment

by:itjockey
ID: 39748021
Thank You
0
 
LVL 8

Author Comment

by:itjockey
ID: 39748028
Mr.als315,

just asking & requesting would you like to solve my other question? if you feel free, as today is last day of the year. If "No" then no hard feelings. Happy New Year.

Math2

Thank You
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now