# Visual Basic > Visual Basic 6 and Earlier >  Need helpt to Write to Google Sheets

## k_zeon

Hi. Does anyone have some code already written that allows data to be uploaded to a google sheet.

or info on where i can find some examples etc

tks

----------


## SamOscarBrown

https://ramblings.mcpher.com/integra...sv4apifromvba/     ?????

I know that is about VBA...but maybe ok for VB6 as well?

----------


## SamOscarBrown

Further research...doubt the API will work with VB6...not sure...maybe someone else can assist.

----------


## Elroy

Sam, I don't think he's talking about the VBA.  Google sheets is the "in the cloud" version of Google's spreadsheet (like Excel, but not Excel).

k_zeon, I've done this before (many years ago), but they changed their API and broke my code.  Once I realized they weren't going to maintain backward compatibility with their API changes, I abandoned any interface between VB6 and Google Drive stuff.

After that happened, I set up my own MySQL server (free) to do what I wanted.  That way, I had total control of things.

p.s.  Google is notorious for not maintaining backward compatibility, as opposed to Microsoft which does a pretty darned good job of it.  Example: VB6 IDE & VB6 compiled programs still going strong after 20+ years.

----------


## SamOscarBrown

Yeah....after I looked more closely at several sites, it became aware to me that probably the API would not work for VB6, only VBA (I knew he was looking for VB6 solution, but thought that link might help).  I made some attempts this morning but failed miserably.  :-)

----------


## Elroy

> Yeah....after I looked more closely at several sites, it became aware to me that probably the API would not work for VB6, only VBA (I knew he was looking for VB6 solution, but thought that link might help).  I made some attempts this morning but failed miserably.  :-)


The time I did it, what I remember was that their API was very "clunky" and that it took many many trial-and-error attempts at getting it going.  Even then, if I remember correctly, there wasn't an easy ability to do standard record management such as add, delete, change, append, etc.  IMHO, Google sheets is NOT the way to store anything resembling a database.

----------


## k_zeon

> Sam, I don't think he's talking about the VBA.  Google sheets is the "in the cloud" version of Google's spreadsheet (like Excel, but not Excel).
> 
> k_zeon, I've done this before (many years ago), but they changed their API and broke my code.  Once I realized they weren't going to maintain backward compatibility with their API changes, I abandoned any interface between VB6 and Google Drive stuff.
> 
> After that happened, I set up my own MySQL server (free) to do what I wanted.  That way, I had total control of things.
> 
> p.s.  Google is notorious for not maintaining backward compatibility, as opposed to Microsoft which does a pretty darned good job of it.  Example: VB6 IDE & VB6 compiled programs still going strong after 20+ years.


Hi Elroy.

I dont have a choice, the company i work for have a customer that we need to send them an excel spread sheet but they dont / wont have office. advised them there are free alternatives 
but think they are not going to install  anything.

They use google sheets 

tks to all that replied.

I did find this  https://www.google.co.uk/url?sa=t&rc...pKFS0gRm12tB1Q

which looked exactly what i wanted but dont think the person will respond to post i made on youtube

tks

----------


## Elroy

> ... the company i work for have a customer that we need to send them an excel spread sheet but they dont / wont have office ... They use google sheets


Google sheets does a fair job of just converting Excel files to Google Sheets when you put them into Google Drive ... no code needed.  I forget the exact details, but it's not difficult.

----------


## Elroy

Also, just thinking about my last post (#8), I've got code to create a old-style Excel file (with no Excel needed on the machine).  And, I believe you can write more recent style Excel files by using something like the ADO (again, no Excel needed).  Then, you could "push" those out to Google Drive to be converted to Google Sheets.

Actually, Google Drive probably fairly easily also converts CSV or TSV files into a Google Sheet as well.

And all of that wouldn't depend on Google's clunky API.

----------

