Advertisement

07.17.2008 at 01:11PM PDT, ID: 23574767
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.0

Need specific spacing in output text files in VB Script

Asked by mgjust in VB Script, Microsoft Excel Spreadsheet Software, Windows Batch Scripting

Below is the script that I got from: http://www.experts-exchange.com/Q_23561753.html I run it as a macro from excel and creates output files.

However its output and the the original file I was trying to emulate are different:
I need the following problems to be fixed:

this line of script:
vbtab & "# CELLS" & vbtab & "BEGIN" & vbtab & "END" & vbtab & "BEGIN" & vbtab & "END")
results in this:

RGNVAL      REGION NAME      # CELLS      BEGIN      END      BEGIN      END

There needs to be 10 spaces between RGNVAL and REGION NAME, 4 spaces between REGION NAME and # CELLS, 6 spaces between # CELLS and BEGIN, 8 spaces between BEGIN and END, 6 space between END and BEGIN, and 8 spaces between BEGIN and END - Like this:

RGNVAL          REGION NAME    # CELLS      BEGIN        END      BEGIN        END

Problem 2:
I need:
34 spaces before LANDUSE STATE 1 and 7 spaces between LANDUSE STATE 1 and LANDUSE STATE 2

Problem 3:
The Spaces Between the values to be inserted are also specific:
For example from three outputs:

from output for 001:

RGNVAL          REGION NAME    # CELLS      BEGIN        END      BEGIN        END
     1             Region 1     294276     138334     119057      92883     112160

5 spaces (before 1), 13 spaces (between 1 and Region 1), 5 spaces (between Region 1 and 1st value), 5 spaces (between 1st and 2nd value), 5 spaces (between 2nd and 3rd value), 6 spaces (between 3rd and 4th value), 5 spaces (between 4th and 5th value)

from output 064:

RGNVAL          REGION NAME    # CELLS      BEGIN        END      BEGIN        END
     1             Region 1     294276      11690         83     219419     231026

5 spaces, 13 spaces, 5 spaces, 6 spaces, 9 spaces, 5 spaces, 5 spaces

from output 074:

RGNVAL          REGION NAME    # CELLS      BEGIN        END      BEGIN        END
     1             Region 1     294276     174357     148695      56763      82425

5 spaces, 13 spaces, 5 spaces, 5 spaces, 5 spaces, 6 spaces, 6 spaces

It appears that the number of spaces depends on the number of digits in the value so if the next value has 6 digits, the number of spaces is 5, if it has 5 digits the number of spaces is 6, if the number has 2 digits the number of spaces is 9, etc

It looks like the spacing is correct from the rest of the output.

Please advise,
MJStart Free Trial
Attachments:
 
current output from script .gmd changed to .txt
 
 
correct output .gmd change to .txt
 
[+][-]07.17.2008 at 01:14PM PDT, ID: 22029751

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]07.17.2008 at 01:24PM PDT, ID: 22029860

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.17.2008 at 01:26PM PDT, ID: 22029887

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.17.2008 at 01:29PM PDT, ID: 22029919

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.17.2008 at 02:42PM PDT, ID: 22030702

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.17.2008 at 02:53PM PDT, ID: 22030792

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.17.2008 at 03:04PM PDT, ID: 22030873

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.17.2008 at 03:07PM PDT, ID: 22030894

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.17.2008 at 03:08PM PDT, ID: 22030903

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.17.2008 at 03:11PM PDT, ID: 22030922

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]07.17.2008 at 03:12PM PDT, ID: 22030928

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: VB Script, Microsoft Excel Spreadsheet Software, Windows Batch Scripting
Sign Up Now!
Solution Provided By: purplepomegranite
Participating Experts: 3
Solution Grade: A
 
 
[+][-]07.17.2008 at 03:16PM PDT, ID: 22030946

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.17.2008 at 03:19PM PDT, ID: 22030969

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]07.17.2008 at 03:23PM PDT, ID: 22030982

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628