Created
April 13, 2010 07:41
-
-
Save taka2/364398 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| stDate = now() | |
| numcols = 100 | |
| numrows = 10000 | |
| Dim arr1 | |
| ReDim arr1(numrows - 1, numcols - 1) | |
| For i = 0 To numrows - 1 | |
| For j = 0 To numcols - 1 | |
| arr1(i, j) = i * j | |
| Next | |
| Next | |
| Set excelObj = CreateObject("Excel.Application") | |
| Set workbooksObj = excelObj.Workbooks | |
| Set workbookObj = workbooksObj.Add(1) | |
| Set sheetObj = workbookObj.Sheets(1) | |
| sheetObj.Range(sheetObj.Cells(1, 1), sheetObj.Cells(numrows, numcols)).Value = arr1 | |
| workbookObj.SaveAs "filename.xls" | |
| workbookObj.Close() | |
| excelObj.Quit() | |
| msgbox stDate & "/" & now() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment