excel(4)
-
MSSQL DATETIME TO EXCEL SERIAL [MSSQL 날짜형식을 엑셀 시리얼 형식으로 변환]
왜 엑셀 시리얼 형태를 사용하는지는 잘 모르겠다. 그냥 고객이 해달라고 하니까 해주는거다. Declare @Date datetime = getdate() Select DateDiff(DD,'1899-12-30',@Date)+(DateDiff(SS,cast(@Date as Date),@Date)/86400.0) excel_serial -- 필요한 경우 소수점을 반올림하면 된다. Select convert(int, DateDiff(DD,'1899-12-30',@Date)+(DateDiff(SS,cast(@Date as Date),@Date)/86400.0)) excel_serial_int Select convert(int, round(DateDiff(DD,'1899-12-30',@Date)+(DateDiff..
2020.07.09 -
VB.NET EXCEL LAST COLUMN, VB 엑셀 마지막 컬럼 구하기
Dim xls As New Excel.Application Dim xWorkbook As Excel.Workbook Dim xWorksheet As Excel.Worksheet Dim xRange As Excel.Range Dim xlotno As String Dim lColumn As Long = 0 xWorkbook = xls.Workbooks.Open("E:\1234512345.xls") 'File Location xWorksheet = xWorkbook.Sheets(1) With xWorksheet If xls.WorksheetFunction.CountA(.Columns) 0 Then lColumn = .Columns.Find(What:="*", _ After:=.Range("A1"), _ Loo..
2016.09.09 -
VB.NET Find Last Row in an Excel Sheet / 엑셀 마지막 행 구하기
Dim xls As New Excel.Application Dim xWorkbook As Excel.Workbook Dim xWorksheet As Excel.Worksheet Dim xRange As Excel.Range Dim xlotno As String Dim lRow As Long = 0 xWorkbook = xls.Workbooks.Open("E:\1234512345.xls") 'File Location xWorksheet = xWorkbook.Sheets(1) With xWorksheet If xls.WorksheetFunction.CountA(.Cells) 0 Then lRow = .Cells.Find(What:="*", _ After:=.Range("A1"), _ LookAt:=Excel..
2016.07.21 -
VB.NET EXCEL Read, Write / VB.NET 엑셀 읽고, 쓰기
참조 - COM - Microsoft Excel 14.0 object Library 사용하면 됩니다!! 없으면 하위버젼도 상관없어요!! Private Sub excel() Dim xls As New Excel.Application Dim xworkbook As Excel.Workbook Dim xworksheet As Excel.Worksheet Dim xRange As Excel.Range Dim xlotno As String xworkbook = xls.Workbooks.Open("E:\12345.xls") xworksheet = xworkbook.Sheets(1) xRange = xworksheet.Range("A1") xlotno = xRange.Value 'Read MsgBox(xlotno) '..
2016.07.20