Solved

.txt Formatting

Posted on 2013-12-30
14
261 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
 Database Backup and Recovery Best Practices

Join Percona’s, Architect, Manjot Singh as he presents Database Backup and Recovery Best Practices (with a Focus on MySQL) on Thursday, July 27, 2017 at 11:00 am PDT / 2:00 pm EDT (UTC-7). In the case of a failure, do you know how long it will take to restore your database?

 
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

Office 365 Training for IT Pros

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

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

This article helps those who get the 0xc004d307 error when trying to rearm (reset the license) Office 2013 in a Virtual Desktop Infrastructure (VDI) and/or those trying to prep the master image for Microsoft Key Management (KMS) activation. (i.e.- C…
Cancel future meetings from user mailboxes in Office 365 using Remove-CalendarEvents
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

623 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