SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    Nov 2009
    Posts
    73
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Asp export to excel formatting

    Hi im hoping someone could help me with this minor format issue in an excel report generated from asp page using 'objFSO.CreateTextFile'.

    This is part of the code im using:
    Code:
    	oFiles.WriteLine("" & rsData("field1") & "," & rsData("field2") & "," & rsData("field3") & "," & rsData("field4") & "," & rsData("field5") & "," & rsData("field6") & ",  "& rsData("field7") &", "& rsData("field8") &", "& rsData("field9") &"")
    Essentially it is only 'field9' that is giving a problem.

    The data for field9 is stored in an access database in a memo field. The data in there is addresses that are up to 5 lines.

    In the database the data is organised but when i use objFSO to output the data into an excel spreadsheet the first line of the address is in one cell and the other lines are in other cells!

    Ideally these address lines need to be in one cell just like how it is in the database.

    Any clues or ideas on what I can do please?

    I have also tried using the replace function to replace any line breaks or spaces but still no joy!

    Grateful for any advice and tips please?

  2. #2
    SitePoint Enthusiast
    Join Date
    Jan 2012
    Posts
    45
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by robert475 View Post


    I have also tried using the replace function to replace any line breaks or spaces but still no joy!
    can you show show how you have tried the replace ?

  3. #3
    SitePoint Enthusiast
    Join Date
    Dec 2005
    Posts
    35
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You need to make sure you are also replacing commas. Line breaks are not a problem, but the commas are.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •