Click here to Skip to main content
15,910,980 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Visual Basic 6.0 Pin
Paul Conrad23-Dec-07 14:02
professionalPaul Conrad23-Dec-07 14:02 
GeneralRe: Visual Basic 6.0 Pin
CPallini17-Dec-07 3:23
mveCPallini17-Dec-07 3:23 
GeneralRe: Visual Basic 6.0 Pin
Paul Conrad23-Dec-07 14:03
professionalPaul Conrad23-Dec-07 14:03 
Questionwhat is eguivalent in c# for CShort in vb...? Pin
tasumisra16-Dec-07 23:36
tasumisra16-Dec-07 23:36 
AnswerRe: what is eguivalent in c# for CShort in vb...? Pin
Ashish Kumar Vyas16-Dec-07 23:58
Ashish Kumar Vyas16-Dec-07 23:58 
GeneralRe: what is eguivalent in c# for CShort in vb...? Pin
CKnig17-Dec-07 2:36
CKnig17-Dec-07 2:36 
AnswerRe: what is eguivalent in c# for CShort in vb...? Pin
Dave Doknjas17-Dec-07 14:30
Dave Doknjas17-Dec-07 14:30 
Generalproblem in importing table into Excel Pin
poonams16-Dec-07 22:59
poonams16-Dec-07 22:59 
hi In my application i want to import table from Access to Excel.I have include Microsoft Web Browser to display the excel sheet .When i am running the application.It display the sheet.But One error is pop up"The file can not access,it being used by another process"

Can anyone give the sol.here is my code
[code]

Try

Dim excel As New Excel.ApplicationClass
Dim wBook As Excel.Workbook
Dim wSheet As Excel.Worksheet

wBook = excel.Workbooks.Add()
wSheet = wBook.ActiveSheet()
filltemp()
Cmd.CommandType = CommandType.Text
'Cmd.CommandText = "Select * from SalRpt_temp"
Cmd.CommandText = "SELECT a.srno as Srno,a.ename as 'Name Of Employee',a.pdays as 'Present Day',a.desig as Designation ,a.bs as Basic,a.dp as DP,a.total as Total,a.hra as HRA,a.cla as CLA,a.ta as TA,a.npa as NPA,a.other as'Other Allowance',a.tal as 'Total Allowance',a.net as 'Net Claim',a.pt as 'PTax',a.it as 'Income Tax',a.sal as 'SalAdv',a.pf as PF,a.lic as LIC,a.bank as 'Bank Recov',a.tdeduct as 'Total Deduction',a.netsal as 'Net Salary' FROM SalRpt_temp a"
Cmd.Connection = con

adp.SelectCommand = Cmd
adp.Fill(ds)
Dim dt As System.Data.DataTable = ds.Tables(0)
Dim dc As System.Data.DataColumn
Dim dr As System.Data.DataRow
Dim colIndex As Integer = 0
Dim rowIndex As Integer = 1

For Each dc In dt.Columns
colIndex = colIndex + 1
excel.Cells(1, colIndex) = dc.ColumnName
Next

For Each dr In dt.Rows
rowIndex = rowIndex + 1
colIndex = 0
For Each dc In dt.Columns
colIndex = colIndex + 1
excel.Cells(rowIndex + 1, colIndex) = dr(dc.ColumnName)
Next
Next
'AxWebBrowser1.Navigate("G:\Salary Package\salary.xls")
wSheet.Columns.AutoFit()
Dim strFileName As String = "G:\Salary Package\salary.xls"
AxWebBrowser1.Navigate(strFileName)

Dim blnFileOpen As Boolean = False
Try
Dim fileTemp As System.IO.FileStream = System.IO.File.OpenWrite(strFileName)
fileTemp.Close()

Catch ex As Exception
blnFileOpen = False
End Try

If System.IO.File.Exists(strFileName) Then
System.IO.File.Delete(strFileName)

End If

wBook.SaveAs(strFileName)
excel.Workbooks.Open(strFileName)
excel.Visible = True


Catch ex As Exception
con.Close()
MsgBox(ex.Message)
End Try

[/code]
plz help me.My technology is vb.net2003 + ms access
poonam

GeneralRe: problem in importing table into Excel Pin
Ashish Kumar Vyas16-Dec-07 23:39
Ashish Kumar Vyas16-Dec-07 23:39 
GeneralSplitter control in vb.net2005 Pin
VB 8.016-Dec-07 22:43
VB 8.016-Dec-07 22:43 
Generalimage combo in vb.net Pin
Deepthy.P.M16-Dec-07 22:40
Deepthy.P.M16-Dec-07 22:40 
GeneralRe: image combo in vb.net Pin
John_Adams17-Dec-07 8:07
John_Adams17-Dec-07 8:07 
GeneralXML Comments Pin
danasegaranea16-Dec-07 21:43
danasegaranea16-Dec-07 21:43 
GeneralRe: XML Comments Pin
CKnig16-Dec-07 21:46
CKnig16-Dec-07 21:46 
GeneralRe: XML Comments Pin
danasegaranea16-Dec-07 21:52
danasegaranea16-Dec-07 21:52 
GeneralRe: XML Comments Pin
CKnig16-Dec-07 22:21
CKnig16-Dec-07 22:21 
GeneralRe: XML Comments Pin
danasegaranea16-Dec-07 22:35
danasegaranea16-Dec-07 22:35 
GeneralRe: XML Comments Pin
CKnig16-Dec-07 23:00
CKnig16-Dec-07 23:00 
GeneralRe: XML Comments Pin
Kevin McFarlane17-Dec-07 6:10
Kevin McFarlane17-Dec-07 6:10 
GeneralImage ComboBox Control in VB.NET Pin
Deepthy.P.M16-Dec-07 21:30
Deepthy.P.M16-Dec-07 21:30 
GeneralRe: Image ComboBox Control in VB.NET Pin
CKnig16-Dec-07 21:42
CKnig16-Dec-07 21:42 
GeneralRe: Image ComboBox Control in VB.NET Pin
Deepthy.P.M16-Dec-07 22:12
Deepthy.P.M16-Dec-07 22:12 
GeneralRe: Image ComboBox Control in VB.NET Pin
CKnig16-Dec-07 22:20
CKnig16-Dec-07 22:20 
QuestionHow to encrypt a string using rijndael algorithm Pin
Nagaraj.k16-Dec-07 21:11
Nagaraj.k16-Dec-07 21:11 
GeneralRe: How to encrypt a string using rijndael algorithm Pin
CKnig16-Dec-07 21:35
CKnig16-Dec-07 21:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.