Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
a b via OfficeKB.com
 
Posts: n/a
Default export data to Excel??

Hi,
I'm trying to export data to a new Excel Sheet as an application. And I am using the following VBScript sub:


Sub print2(controlID)
dim sButtonClicked, sHTML, pos, sButtonHTML, oExcel, oBook, Elements, tblTOExport
sButtonClicked = controlID & "_hlkExportTOExcel"
Set Elements = document.all.tags("table")
FOR i=0 TO Elements.length -1
pos = InStr(Elements.Item(i).innerHTML, sButtonClicked)
if pos 0 then
tblTOExport = Elements.Item(i).Id
Exit For
end if
NEXT
sHTML = document.all.item(tblTOExport).outerHTML
sButtonHTML = document.all.item(sButtonClicked).outerHTML
sHTML = Replace(sHTML, sButtonHTML, " ")
set oExcel = createobject("Excel.application")
set oBook = oExcel.Workbooks.Add
oBook.HTMLProject.HTMLProjectItems("Sheet1").Text = sHTML
oBook.HTMLProject.RefreshDocument
oExcel.Visible = True
oExcel.UserControl = True
End Sub

I've two problems :
1) In the formed sheet I cannot see Turkish characters correctly. I'm losing actual letters, is there a need to set the encoding / language to Turkish, if there is how can I do that?

2) I want to remove the Hyperlinks in the sheet but when I use WorkSheet.Hyperlinks.Delete I'm also losing the formatting.

Any help??

--
Message posted via http://www.officekb.com
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2003 FAILS, but Excel 2000 SUCCEEDS ??? Richard Excel Discussion (Misc queries) 2 May 13th 23 11:46 AM
Fetching External Data from Excel Sri Excel Discussion (Misc queries) 2 January 3rd 05 11:46 AM
How can I export Excel data to Quicken? acfoxb Excel Discussion (Misc queries) 1 January 2nd 05 10:27 PM
Export Excel Data to Access With a Macro!!! Jac Excel Discussion (Misc queries) 3 December 28th 04 07:39 PM
Can I export Excel data into another software? JZ Excel Discussion (Misc queries) 0 December 24th 04 01:15 PM


All times are GMT +1. The time now is 11:27 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"