rahulpatra10 / google-spreadsheet-lib-android

Automatically exported from code.google.com/p/google-spreadsheet-lib-android
0 stars 0 forks source link

getting exception on adding new record in exiting workshit. #10

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
hello

First of all i want say thank to create nice library.

with the help of library i m able create new spreadsheet with worksheet and 
adding new record i have done.

but the now problem is that i want add new record in my previously created 
worksheet that worksheet create by library. in that i get exception 

<exception > 
java.lang.IllegalAccessError: This WorkSheet doesn't have any Table
       at com.pras.WorkSheet.addRecord(WorkSheet.java:288)
       at com.smsBackup.gdocs.workshit.addRecord(workshit.java:92)
       at com.smsBackup.gdocs.mainAct.onClick(mainAct.java:37)
       at android.view.View.performClick(View.java:2408)
       at android.view.View$PerformClick.run(View.java:8817)
       at android.os.Handler.handleCallback(Handler.java:587)
       at android.os.Handler.dispatchMessage(Handler.java:92)
       at android.os.Looper.loop(Looper.java:143)
       at android.app.ActivityThread.main(ActivityThread.java:4914)
       at java.lang.reflect.Method.invokeNative(Native Method)
       at java.lang.reflect.Method.invoke(Method.java:521)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
       at dalvik.system.NativeStart.main(Native Method)
   Force finishing activity com.smsBackup.gdocs/.mainAct

</exception > 

What is the expected output? What do you see instead?

i want add new record in my previously created worksheet.

What version of the product are you using? On what operating system?
i have use only one lib that is "GoogleSpreadSheet.jar"

Please provide any additional information below.

i have attach my workshit class that i use to create SpreadSheet and worksheet 
and add record.

Please Help Me Out.
Regard
Milind kanani

Original issue reported on code.google.com by milind.v...@gmail.com on 11 Aug 2011 at 10:58

Attachments:

GoogleCodeExporter commented 9 years ago
Hi Milind,

it seems you are using wrong method to add record to SpreadSheet/WorkSheet. 
addRecord() is used if you are using Table feed, that is why it has given 
exception that- " This WorkSheet doesn't have any Table".

Table feed is being deprecated by Google. So you should use List Feed methods-
SpreadSheet.addListWorkSheet() - to create List Feed based WorkSheet
WorkSheet.addListRow() - to add List feed based row
WorkSheet.getData()- to read data

Hope it helps.
Thanks,
Prasanta

Original comment by pprasant...@gmail.com on 11 Aug 2011 at 11:24

GoogleCodeExporter commented 9 years ago
Hi Prasanta,

Thanks for reply and your support.

i have try with SpreadSheet.addListWorkSheet() but dont get mehtod 
addListWorkSheet in 
SpreadSheet class. i m using  GoogleSpreadSheet.jar.

which jar i have to add for this. and if possible please provide some example 
code.

Thanks
Milind

Original comment by milind.v...@gmail.com on 11 Aug 2011 at 11:47

GoogleCodeExporter commented 9 years ago
Pls use the latest lib- gss-lib-2.2.zip 
There is one Sample- GSS_Client_Application-
http://code.google.com/p/google-spreadsheet-lib-android/downloads/list

Thanks,
Prasanta

Original comment by pprasant...@gmail.com on 11 Aug 2011 at 12:01

GoogleCodeExporter commented 9 years ago
the sample in the zip is very misleading, I though the add record is for adding 
a new row of data too. Maybe more description on this part?

Original comment by nickj...@gogolook.com on 5 Aug 2014 at 10:04