|
Dear Richard
Thanks For your Reply.
Actually that Worksheet is in .xls format.
I need to Write a Macro that Take the Column value from the Excel Sheet and Generate the Xml File From the particular field...
Thanks n Regards,
Ramya.R
-- modified at 6:36 Thursday 23rd February, 2006
|
|
|
|
|
Hi
What do you want to do with the XML file?
You can write 'text' to a file, in the following format:
<?xml version="1.0" encoding="utf-8"?>
<Sheet1>
<add key="CellA1" value="9.8205" />
<add key="CellA2" value="1473" />
</Sheet1>
You can test this by taking the above, pasting it into notepad, save it. Then change the extension from txt to xml. Then try opening it with the application that requires the file.
You'd have to look at the VBA help to see how to do the FileIO though. (Can help you with VB.Net code only, not VBA ->> Sorry)
|
|
|
|
|
Thanks alot Richard.........
Im new to Xml,Excel and VBA.Your Code Works Fine..
Once again thanks For yor Help....
Thanks n Regards,
Ramya.R
|
|
|
|
|
I have a database in Access 2003 and i set the password for that database.And also connect the database in VB6.0. The code is Cn.open "Driver={Microsoft access Driver(*.mdb)};DBQ=c:\Sam.mdb;pwd=vijay;".vijay is password of my database.But this code not working,
"couldn't find data source and no default driver specifed" this error occured.How do i solve this problem.Reply me soon plz
vijay.
Learn Lot
|
|
|
|
|
Hey, posting the same message three times won't get you an answer any sooner!
Have you looked up the error? What does it say? (Hint: the driver may be incorrect or a wrong path to your MDB file
...Steve
"Give a man a fish and you've fed him for a day. Teach him how to fish and you've fed him for life." (Translation: I'll show you the way, but not write the code for you.) I read that somewhere once
|
|
|
|
|
If ODBC is not working , try OLE DB to connect to Access . That is more easy to work .
Divya Rathi
|
|
|
|
|
Hi,
I have a database in Access 2003 and i set the password for that database.And also connect the database in VB6.0. The code is Cn.open "Driver={Microsoft access Driver(*.mdb)};DBQ=c:\Sam.mdb;pwd=vijay;".vijay is password of my database.But this code not working,
"couldn't find data source and no default driver specifed" this error occured.How do i solve this problem.Reply me soon plz
vijay.
Learn Lot
|
|
|
|
|
Hi,
I have a database in Access 2003 and i set the password for that database.And also connect the database in VB6.0. The code
Cn.open "Driver={Microsoft access Driver(*.mdb)};DBQ=c:\Sam.mdb;pwd=vijay;"
vijay is password of my database.But this code not working,
"couldn't find data source and no default driver specifed" this error occured.
How do i solve this problem.Reply me soon plz.
vijay.
Learn Lot
|
|
|
|
|
It could be because you've supplied a password, but no user ID.
Cn.Open "Driver={Microsoft Access Driver (*.mdb)};Dbq=C:\Sam.mdb;Uid=Admin;Pwd=vijay;"
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hello there..
Urgently i need your guys help out there. Now i am planning to create an application which deals with the bluetooth technology. I would like to know how can i use VB.NET 2005 to do my application and how can i establish the connection from the server to mobile phone which is integrated with bluetooth? Do i need Winsock (Windows Socket) to establish the connection? if yes, how can i do it with vb.net 2005?
Please help me here. i am really stuck with my project now
Thanks
Tillandran
|
|
|
|
|
I don't think much has changed since you last posed this question in January[^]
tillandran wrote: I would like to know how can i use VB.NET 2005 to do my application
It's just like any other dev environment really - if you know the .NET Framework? In any case, try the programmer's friend[^] for possible answers.
...Steve
"Give a man a fish and you've fed him for a day. Teach him how to fish and you've fed him for life." (Translation: I'll show you the way, but not write the code for you.) I read that somewhere once
|
|
|
|
|
Please tell me you're still not planning on spamming people's phones while they're shopping, are you?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi,
I am generating datatable dynamically (at run time) and to diplay this table I am generating DataGrid dynamically. But how to Add those datagrid to the Form collection so that I can see the data all the datatable having. ( The contraints is number of Datatable is not fixed and each table can be having Different nmber of colomns so everything I am to do at run time. )
Please help
Thanks in advance.
here is a part of Code :
'********************************************************************
For intPSectionIdCount = 0 To arrParentSectionIds.Length - 1
Dim arrDataTableRows() As DataRow
intParentSectionId = arrParentSectionIds(intPSectionIdCount) '
'Get each parent section id
arrDataTableRows = dTAllParentSectionDetails.Select("TDetails_Section_Parent_Id=" & intParentSectionId.ToString()) ' Get the
details of the child of that parent section
dT(intPSectionIdCount)=ProcessDataTable(CovertToDatatable(arrDataTableRows))
'Convert the array of datarow --> datatable -->Report showing table
Dim dg As New System.Web.UI.WebControls.DataGrid
dg.DataSource = dT(intPSectionIdCount).DefaultView
dg.DataBind()
Next
'********************************************************************
Arindam D T
|
|
|
|
|
|
can every 1 give example?
im currently doin some study..is it possible store data using note pad?
data tat 1 wanna store(example)
i.d, name, .jpeg(picture file)
any resource, pls reply me....thanks!!!!
|
|
|
|
|
williamccyccyccy wrote: is it possible store data using note pad?
Yes, you type your data into a TextBox (this is all Notepad is really) and Notepad will let you save it to a .TXT file. Is it practical? Nope.
Can your application save data to a .TXT file? Yes. Can you save an image in a .TXT file? No, but you can save the path to an image file.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Use the code below to create and write to a text file
Dim oFile As System.IO.File
Dim oWrite As System.IO.StreamWriter
oWrite = oFile.CreateText(Path\filename.txt)
Dim fileStream As FileStream
Dim streamWriter As StreamWriter
fileStream = New FileStream(Path:=path\filename.txt", mode:=FileMode.Append, access:=FileAccess.Write)
streamWriter = New StreamWriter(Stream:=fileStream)
streamWriter.BaseStream.Seek(offset:=0, origin:=SeekOrigin.End)
streamWriter.WriteLine(value:="" & field1 & field2 & "")
streamWriter.Flush()
streamWriter.Close()
fileStream.Close()
Hope this code is helpful to u. However, you will not be able to store images in the text file.
With Best Regards,
Mayur
|
|
|
|
|
You might want to check to make sure your replying to the correct post...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi all,
Another question for all you DataGrid gurus out there... I have a read only datagrid which (for reasons that are unimportant here) my users want to totally ignore any mouse clicks. However, the grid will always need to be scrolled so I can't simply set the grid 'Enabled' property to False.
What I really want is something like what you can do with the KeyPress/KeyDown events where you can say '<event args="" object="">.Handled = true' and the event will simply ignore that key... how can I do the same *just* for my datagrid but for mouse clicks?
TIA once again for any help.
Mike
|
|
|
|
|
What specifically is it you want to ignore? Column sorting? If so, set AllowSorting to False. Colors changing when a row is clicked? If so, set the SelectionBackColor to be the same as BackgroundColor. You would also probably want to set RowHeadersVisible to False and ReadOnly to True. Is there something beyond this?
Dean
|
|
|
|
|
Thanks Dean... the issue we're having is even when the datagrid is readonly the user can still click on the grid and the selected cell changes colours as if it is going to allow the user to edit it... I'll try the SelectionBackColor and see how that goes.
Even so I do wish there was a way to ignore (or turn off) a certain event for any control like the handled property of KeyDown does.
Mike
|
|
|
|
|
|
|
Email will not send my visual studio 2003 project
1. I am using MSDE, IIS, Visual studio 2003, 1.1 netframework, I have mail Outlook and msn homail,
2. these are installed on windows xp
3. Can I send email if I only have msde and not a regular server?
4. The project works except the sending of the email
5. I thought I have coded below correctly, but I do not receive emails
Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
' Fires when the application is started
'1. Create a connection
Dim myConnection As New SqlConnection(ConfigurationSettings.AppSettings("connectionString"))
myConnection.Open()
'2. Create the command object, for the query
Const strSQL As String = "Select LastUpdated, ProductId from products "
Dim objCmd As New SqlCommand(strSQL, myConnection)
Dim objDR As SqlDataReader
Dim att
objDR = objCmd.ExecuteReader()
While (objDR.Read)
If (Not (objDR("LastUpdated") Is DBNull.Value)) Then
If (Date.Compare(objDR("LastUpdated"), Today.Date) = 0) Then
Dim newMail As New MailMessage
newMail.From = "from@from.com" '' this is the From Address
newMail.To = "kenn_rosie@msn.com" '' this is TO Address
'newMail.Cc = "hadeedian@hotmail.com" '' this is TO Address
newMail.Subject = "Change in Product Rate"
newMail.Body = " Dear Ken, " & "Please review attached email for product ID: " & objDR("ProductID") & "Thank you," & "Kenn()"
att = New MailAttachment("C:\Inetpub\wwwroot\GrocerToGo\Product_Changed.doc")
newMail.Attachments.Add(att)
newMail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1")
newMail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "username")
newMail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "password")
SmtpMail.SmtpServer = "mailserver"
SmtpMail.Send(newMail)
End If
End If
End While
myConnection.Close() 'Close the connection
End Sub
|
|
|
|
|
A few things to check...
Try to sent an email from the command line via telnet, this is email in it's simplest form to comfirm that port 25 and the SMTP server are OK.
http://www.yuki-onna.co.uk/email/smtp.html[^]
If this works great if not check you don't have port filtering or antivirus stopping your mail app. McAfee has a "unwanted apps filter" as some of the others do and this treats port 25 bound apps as mail worms, (This caught me out on my app).
Hope this helps, let me know...
P.S. Code looks OK will try it and see.
When people make you see red, be thankful your not colour blind.
-- modified at 19:45 Wednesday 22nd February, 2006
|
|
|
|