Solved

.txt Formatting

Posted on 2013-12-30
14
257 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:Naresh Patel
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 9
  • 5
14 Comments
 
LVL 40

Expert Comment

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

Author Comment

by:Naresh Patel
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 40

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
RoboForm Secure Password Management System

RoboForm Everywhere - Superb Browser Support
Windows / Apple / IOS / Android / Linux / Chrome OS
Use different complex passwords everywhere
Best Secure Password Management by far
Synchronize all of your devices instantly
Safe, Secure & Highly Recommended!

 
LVL 8

Author Comment

by:Naresh Patel
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 40

Expert Comment

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

Author Comment

by:Naresh Patel
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:Naresh Patel
ID: 39747829
Thanks & Thanks For Promptness .....& Happy New Year.   :)
0
 
LVL 8

Author Comment

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

Author Comment

by:Naresh Patel
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 40

Expert Comment

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

Author Comment

by:Naresh Patel
ID: 39747993
Mr.als315,


Sure pls see attached file..



Thanks
Downloader.xlsx
0
 
LVL 40

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:Naresh Patel
ID: 39748021
Thank You
0
 
LVL 8

Author Comment

by:Naresh Patel
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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

Suggested Solutions

When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

734 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