Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 266
  • Last Modified:

.txt Formatting

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
Naresh Patel
Asked:
Naresh Patel
  • 9
  • 5
1 Solution
 
als315Commented:
Look at sample
Uploader1.xlsm
0
 
Naresh PatelTraderAuthor Commented:
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
 
als315Commented:
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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
Naresh PatelTraderAuthor Commented:
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
 
als315Commented:
Try sample Uploader2 from comment above
0
 
Naresh PatelTraderAuthor Commented:
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
 
Naresh PatelTraderAuthor Commented:
Thanks & Thanks For Promptness .....& Happy New Year.   :)
0
 
Naresh PatelTraderAuthor Commented:
May I get some little help on same question?
0
 
Naresh PatelTraderAuthor Commented:
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
 
als315Commented:
Possible, but can you show sample?
0
 
Naresh PatelTraderAuthor Commented:
Mr.als315,


Sure pls see attached file..



Thanks
Downloader.xlsx
0
 
als315Commented:
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
 
Naresh PatelTraderAuthor Commented:
Thank You
0
 
Naresh PatelTraderAuthor Commented:
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

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

  • 9
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now