codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  Storing data from HTML to Excel or TXT  kailash.rathi at 05:38 on Friday, June 01, 2007
 

Hi,

I want to store the data from Radio Options submitted by user to Excel.
I have a Java script for the Poll which gives Poll in HTMl can I transfer the data to Excel or other file .
I Dont have any Database.

I can also make the Radio Buttons form in HTMl instead of above mentioned .JS but as I donthave any database please tell me is it possible to transfer data to Excel file or other file (txt etc).

If yes, tell me the coding. I think it will be something in ACTION=""

Thanks
Kailash

  Re: Storing data from HTML to Excel or TXT  Rgsgiri at 12:30 on Monday, September 15, 2008
 

Hi kailash.rathi,

I tried the following codes. Its working for me. Similar logic you suppose to try for radio button also. Please find my sample code below,


<HTML>
<HEAD><TITLE>Exporting into Excel</TITLE></HEAD>
<SCRIPT Language = "VBScript">

Function Export(P,R)

Set ExcelApp = CreateObject("Excel.application")
ExcelApp.Visible = True
strPathDoc = "D:\Test.xls" 'Your File path
Set myExcelDoc = ExcelApp.Workbooks.Open(strPathDoc)
ExcelApp.Visible = True
myExcelDoc.Windows(1).Visible = True
set XlSheet = myExcelDoc.Worksheets(2)
XlSheet.Range("A6").value=P
XlSheet.Range("A7").value=R
myExcelDoc.save
myExcelDoc.close
Set myExcelDoc = Nothing
Set ExcelApp = Nothing
End Function

Sub cmdExp_OnClick()
Dim lPrincipal
Dim dblRate

Frstnm = Disnm.value
Lstnm = TreatGrp.value
cInterest = Export(Frstnm, Lstnm)

End Sub


</SCRIPT>
<BODY>
<BR>
First Name: <INPUT Type="Text" Name="Disnm" Value=""><BR>
Last Name : <INPUT Type="Text" Name="TreatGrp" Value=""><BR>
<INPUT Type="Button" Name="cmdExp" Value="Connect">
</BODY>
</HTML>


Warm Regards,
GG


  Re: Storing data from HTML to Excel or TXT  urparagjyoti at 09:38 on Saturday, July 25, 2009
 

Sir,
Thank you so much for your valuable source code which helped me in my project.In your code previous data is replaced with the newer data,but sir if I want to append data in the same excel sheet how i will do it?Please help me with your innovative source code.

Thank you in advance.


  Re: Storing data from HTML to Excel or TXT  nani2020nani at 10:43 on Monday, August 31, 2009
 

Appending data obtained from Html in an excel sheet

--------------------------------------------------------------------------------

this is wat i want

i hve html page...one text box where u can enter data

wen u click button ..dataa should be moved to a excel sheet

again if u give one more data in html that shud be appended in excel

append n not replace !!

Im attaching my html file in text format...i m not getting it ..can u plz try









CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
• C++
• Re: refresh parent after closing pop up window
• Dynamic Insertion
• Date and Time function around the world???
• Significant Factors
• Perl array access
• Re: huffman encoding and decoding in C++...
• Perl One Liner: Replace {(
• Re: html including php, accessing the functions


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2009