ByteScout Spreadsheet SDK - VB6 - create a spreadsheet - ByteScout
Announcement
Our ByteScout SDK products are sunsetting as we focus on expanding new solutions.
Learn More Open modal
Close modal
Announcement Important Update
ByteScout SDK Sunsetting Notice
Our ByteScout SDK products are sunsetting as we focus on our new & improved solutions. Thank you for being part of our journey, and we look forward to supporting you in this next chapter!

ByteScout Spreadsheet SDK – VB6 – create a spreadsheet

  • Home
  • /
  • Articles
  • /
  • ByteScout Spreadsheet SDK – VB6 – create a spreadsheet

ByteScout Spreadsheet SDK – VB6 – create a spreadsheet

Form1.frm

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
VERSION 5.00
Begin VB.Form Form1
   Caption         =   "Form1"
   ClientHeight    =   2400
   ClientLeft      =   45
   ClientTop       =   435
   ClientWidth     =   3750
   LinkTopic       =   "Form1"
   ScaleHeight     =   2400
   ScaleWidth      =   3750
   StartUpPosition =   3  'Windows Default
   Begin VB.Label Label1
      Caption         =   "See the Output.xls file in the same folder"
      BeginProperty Font
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   204
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1695
      Left            =   360
      TabIndex        =   0
      Top             =   360
      Width           =   3015
      WordWrap        =   -1  'True
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Load()
 
Set document = CreateObject("Bytescout.Spreadsheet.Spreadsheet")
 
 ' Add new worksheet
Set worksheet = document.Workbook.Worksheets.Add("HelloWorld")
 
' get cell value
Set cell = worksheet.Item(0, 0) ' you can also use worksheet.Cell("A1") as well
 
' set cell value
cell.Value = "Hello, World!"
 
' delete output file if exists already
Set fso = CreateObject("Scripting.FileSystemObject")
If (fso.FileExists("Output.xls")) Then fso.DeleteFile ("Output.xls")
Set fso = Nothing
 
' save document
document.SaveAs "Output.xls"
 
' close Spreadsheet
Set document = Nothing
 
End Sub

  Click here to get your Free Trial version of the SDK

Tutorials:

prev
next