When adding a second sheet to an Excel workbook I am getting this error.
java.lang.StringIndexOutOfBoundsException: length=0; index=0
Code is:
Dim wbkArmies As WritableWorkbook
Dim shtArmy1, shtArmy2 As WritableSheet
Dim strArmy1, strArmy2 As String
strArmy1 = "France"
strArmy2 = "Austria"
shtArmy1 = wbkArmies.AddSheet(strArmy1, 0)
shtArmy2 = wbkArmies.AddSheet(strArmy2, 1)
First AddSheet works but the second one gets the error. Does anyone know what I am doing wrong? I tried numerous things, such as adding data onto sheet 0 before adding the second, but get the same error.
Thanks for any help.
java.lang.StringIndexOutOfBoundsException: length=0; index=0
Code is:
Dim wbkArmies As WritableWorkbook
Dim shtArmy1, shtArmy2 As WritableSheet
Dim strArmy1, strArmy2 As String
strArmy1 = "France"
strArmy2 = "Austria"
shtArmy1 = wbkArmies.AddSheet(strArmy1, 0)
shtArmy2 = wbkArmies.AddSheet(strArmy2, 1)
First AddSheet works but the second one gets the error. Does anyone know what I am doing wrong? I tried numerous things, such as adding data onto sheet 0 before adding the second, but get the same error.
Thanks for any help.