Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

CSV text to Excel

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    CSV text to Excel

    I have an issue when creating a text csv file that is then opened in Excel. One such character field when seen by Excel is displayed as exponent whenever there are only numbers in the string--if even just one letter it will display correctly.

    I can format the cells then in Excel 2003 as numeric with 0 decimals and the string will display but here is where the larger issue manifests itself...the last 3 characters become 0's irrespective of what they originally were--not good !! I have tried double-quoting them prior to opening in Excel but it makes no difference.

    I am hoping someone else has experienced this...but even if not any suggestions as to possible ways to open this file with Excel and maintain the string would be great.

    A small example of a string would be:

    Code:
    D,999999999,"8000062E1244050917",Displays Correctly
    D,999999999,"800007644264008809",Exponent_last 3 characters should be 809
    D,999999999,"10C00001132078339",Displays Correctly
    D,999999999,"22A00001141678279",Displays Correctly
    D,999999999,"800005241207937686",Exponent_last 3 characters should be 686
    When saved as a .CSV file and then opened in Excel 2003, you will see that 2 have been converted to exponent (the ones without any letter, only digits). Formatting the cell to numeric without decimal changes the last 3 characters to 0s so this is not a remedy.

    This particular field happens to be a linking field that will be used even after exporting as a csv file so I cannot add a letter---I will have to actually ask about that as that may be an alternative. I will have to find out exactly how it is to be used after the fact--the specs say it cannot be....but hey, never say never right! But would rather oblige them than have them make an exception if possible.

    Anything to try would be great! :)
    Mike
    __________________________________________
    It is only when we forget all our learning that we begin to know.
    It's not what you look at that matters, it's what you see.
    Henry David Thoreau
    __________________________________________




    #2
    Re: CSV text to Excel

    Mike

    Not sure if this will work for you.

    But, I have had good luck making a table that has the field names named as my desired column names and then just export the entire table to Excel.

    Anyway, I just tested this using quick export from a dummy table and your problem numbers appeared in their entirety in Excel.

    Might not be exactly what you were looking for...but it seems to work.

    As an aside, the other thing I like about doing it this way is that I make my field names "read easy" and they end up as the column names in Excel instead of my normal naming convention.... which would not mean anything to users I might send the spreadsheet to.

    Regards,

    Jeff

    Later: I guess I overlooked whether you actually needed the CSV file. My suggestion above obviously takes you straight to an Excel file with no CSV file.
    Last edited by jkletrovets; 03-30-2010, 12:32 AM. Reason: Another thought:

    Comment


      #3
      Re: CSV text to Excel

      Thanks Jeff.

      The CSV is what is required overall but the excel is used to show and verify data to the submitter of the file.....and the ID numbers are most times necessary to show them....

      No headers are used whatsoever in this.....and I have other lines to add to the beginning, the middle, and the end of the records which do not have the same fields.

      I still may have to utilize a similar method to what you suggested as I have done it before but is piecework sort of....export table data to file, add lines to file, export more table data to file, add more lines, etc. A "Pain" but it may end up being what is necessary to maintain the data integrity for the agency that needs this.

      Thanks for the looksee though Jeff!
      Mike
      __________________________________________
      It is only when we forget all our learning that we begin to know.
      It's not what you look at that matters, it's what you see.
      Henry David Thoreau
      __________________________________________



      Comment


        #4
        Re: CSV text to Excel

        A related, but not similar question, was answered recently:
        Keith Hubert wanted to know how to export to Excel while maintaining certain titles etc... in Excel.

        In your case, when you export to Excel, Excel plays smart and takes those digits to mean numbers not characters and hence the exponent. So the question, which would in a way correlates to Keith's, is how to force those fields (columns) to remain as character not numeric. See my answer to Keith and you could apply it here in this case, or:

        You could add a single quotation to the left of the field that has these digits forcing Excel to accept it as character (haven't tried it but easy to implement), or:

        You could write an Excel macro that converts that column to "Accounting".

        That said, I am not sure who is dealing with septillions, unless of course if you intern for the Congress.

        Comment


          #5
          Re: CSV text to Excel

          Hi G,
          I will take another look at Keith's thread.

          Changing the format after opening the CSV in Excel does not work as the end 3 characters are changed to zeros when done---whether changing to Numeric or Accounting with no decimals.

          You could add a single quotation to the left of the field
          Yeah--almost the same as what I indicated I will have to find out about in regard to adding a letter to it--for sure though a single quote....or any other special character is forbidden--I already had to Remspecial() it to get rid of a dash that was originally in the field's string to meet the CSV's required format--which still enables the submitter to see the ID values and myself to still be able to use it as an ID link.....

          I am still hoping to be able to perhaps just add a single letter to each and every one such as a "Z" maybe. I will have to wait to find out I guess.

          Still odd that Excel will take one cell and regard it as character and a different row, same column to be exponent---but guess this is perhaps part of Excel's power also to be able to do this......

          I was hoping against hope as it were----thinking that maybe there was just a default setting a user could set in Excel to make it always take the data as just character---then would not have to work - around this as it were.... :)

          Thanks again G. Least I now know it was not just a simply matter of doing something wrong--- but then it would have been easier to just be wrong and then correct it than to have to figure out a different way altogether!!


          EDIT::
          who is dealing with septillions
          QuickBooks does I guess---in fact this ID field allows up to 36 characters... :)
          Mike
          __________________________________________
          It is only when we forget all our learning that we begin to know.
          It's not what you look at that matters, it's what you see.
          Henry David Thoreau
          __________________________________________



          Comment


            #6
            Re: CSV text to Excel

            Originally posted by MikeC View Post

            I was hoping against hope as it were----thinking that maybe there was just a default setting a user could set in Excel to make it always take the data as just character
            Read Keith's thread..

            Comment


              #7
              Re: CSV text to Excel

              Or:
              Break the field into 2 fields by using a coma at say the 11th (anything <16) character position so when it is exported to Excel it will be read as two columns, then concatenate them in Excel.
              i.e.
              800007644264008809
              will become:
              8000076442,64008809

              Comment

              Working...
              X