+ Reply to Thread
Results 1 to 9 of 9

I have code to save a string as UTF8 - I need to save an entire Excel SHEET as UTF8!

  1. #1
    Registered User
    Join Date
    09-25-2009
    Location
    London, England
    MS-Off Ver
    MS Office 365
    Posts
    17

    I have code to save a string as UTF8 - I need to save an entire Excel SHEET as UTF8!

    I have a sheet in Excel which I want to save as a UTF8 format text file. I previously thought it couldn't be done but I found the below and it definitely works in saving a text string as one:

    Code:

    Please Login or Register  to view this content.
    What I need to do is adapt the references to cText to save an entire named Excel worksheet in UTF8 format, instead of that single string of text. I would like to think this is quite straight forward, but my initial attempts haven't been successful.

    I have also asked this question at OzGrid. As yet, no-one has been able to solve it on either forum.

    Thank you greatly, as always, in advance.
    Last edited by schnide; 06-16-2011 at 11:49 AM. Reason: Tags changed and links added, as requested.

  2. #2
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: I have code to save a string as UTF8 - I need to adapt to save entire SHEET as UT

    Hi, and welcome to the forum.

    Unfortunately:

    Your post does not comply with Rule 8 of our Forum RULES. Cross-posting is when you post the same question in other forums on the web. You'll find people are disinclined to respond to cross-posts because they may be wasting their time solving a problem that has been solved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser) to the cross-post. Expect cross-posts without a link to be closed a message will be posted by the moderator explaining why. We are here to help so help us help you!

    Read this to understand why we ask you to do this.

    Note: I also amended your tags from QUOTE to CODE tags.
    Remember what the dormouse said
    Feed your head

  3. #3
    Registered User
    Join Date
    09-25-2009
    Location
    London, England
    MS-Off Ver
    MS Office 365
    Posts
    17

    Re: I have code to save a string as UTF8 - I need to adapt to save entire SHEET as UT

    Point fully accepted, although I want to make clear that if I'm provided a solution in either forum I will post it in the other!

  4. #4
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: I have code to save a string as UTF8 - I need to adapt to save entire SHEET as UT

    That's not the sole issue, as the link I posted indicates. Can you please add links to your other posts as requested?

  5. #5
    Registered User
    Join Date
    09-25-2009
    Location
    London, England
    MS-Off Ver
    MS Office 365
    Posts
    17

    Re: I have code to save a string as UTF8 - I need to adapt to save entire SHEET as UT

    Quote Originally Posted by romperstomper View Post
    That's not the sole issue, as the link I posted indicates. Can you please add links to your other posts as requested?
    Yes

  6. #6
    Registered User
    Join Date
    09-25-2009
    Location
    London, England
    MS-Off Ver
    MS Office 365
    Posts
    17

    Re: I have code to save a string as UTF8 - I need to adapt to save entire SHEET as UT

    Despite the help on how to post here, no-one otherwise answered so in the meantime I had to learn a little about ADO Streams and I seem to have solved this myself! The link is as below:

    Oz Grid - Saving a file as UTF8 in Excel

  7. #7
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: I have code to save a string as UTF8 - I need to adapt to save entire SHEET as UT

    Did you consider using:

    Please Login or Register  to view this content.



  8. #8
    Registered User
    Join Date
    09-25-2009
    Location
    London, England
    MS-Off Ver
    MS Office 365
    Posts
    17

    Re: I have code to save a string as UTF8 - I need to adapt to save entire SHEET as UT

    Have you used that and seen the file format that it outputs to? Because when I use that macro it saves as unicode, not UTF8.
    Last edited by schnide; 06-14-2011 at 11:14 AM. Reason: Added some more helpful information

  9. #9
    Registered User
    Join Date
    09-25-2009
    Location
    London, England
    MS-Off Ver
    MS Office 365
    Posts
    17

    Re: I have code to save a string as UTF8 - I need to adapt to save entire SHEET as UT

    I've now simplified the code over at Ozgrid. It is now possible to save an Excel file as UTF8.

    I will mark this thread as solved!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1