1 (edited by leprince2007 2020-09-21 18:17:34)

Topic: Create an application that depend on an Excel file

Hello Every body,
I created apost here,but I didn`t get help:
http://myvisualdatabase.com/forum/viewt … 095#p38095
Could you help me in my question,please?

I want to link my application to an excel file.or use the excel file as my database.
see examples for code that I want to create but in vba(Excel Programming languague):
1-textboxes get data from the excel file:
Example:

Textbox1.text=sheet1.range("A1")
Textbox2.text=sheet1.range("b1")
Textbox3.text=sheet1.range("c1")

2-Write data to excel file:
Example:

sheet1.range("A1")=Textbox1.text
sheet1.range("b1")=Textbox2.text
sheet1.range("c1")=Textbox3.text

and more like that.
thanks for helping

Re: Create an application that depend on an Excel file

Here's a sample. Hope this helps you with your project. Kudos!

Post's attachments

Attachment icon leprince_excel.zip 500.75 kb, 221 downloads since 2020-09-29 

brian

Re: Create an application that depend on an Excel file

Thank you very much
The code repeats declaration ,opening and closing excel file.This slows down the program.
Could you please make the following modification,please?
The code should consist of:
1-General declarations
2-form load:open excel file and read data
3-button 1:writes data to excel
4-form close:closes file
see the attached picture .It Is a code-in visual basic- that I need to create one like.
https://i.ibb.co/XV7W5KK/VB.jpg
Thanks in advance

Re: Create an application that depend on an Excel file

Just declare it globally

Post's attachments

Attachment icon leprince_excel2.zip 500.79 kb, 250 downloads since 2020-10-02 

brian

Re: Create an application that depend on an Excel file

Great !Thank you very much.

Re: Create an application that depend on an Excel file

Hi, Brian,
I have something similar: an  Access database with several columns and lot of records (rows) and nothing else.
I want to search, add, edit or delete records using MVD.
Can you (or someone else) set a simple example?
Thanks in advance.

7 (edited by brian.zaballa 2020-10-03 13:18:39)

Re: Create an application that depend on an Excel file

Zlaya wrote:

Hi, Brian,
I have something similar: an  Access database with several columns and lot of records (rows) and nothing else.
I want to search, add, edit or delete records using MVD.
Can you (or someone else) set a simple example?
Thanks in advance.

Unfortunately, MS-Access Database is not yet supported in MVD.
Implementing an add, edit, delete will require additional script coding here in MVD. I hope MVD DevTeam will add it the future tho. For now, here's a sample. I only implement display and add functionality to give you an idea.

Post's attachments

Attachment icon test-ms-access.zip 516.22 kb, 271 downloads since 2020-10-03 

brian

Re: Create an application that depend on an Excel file

Thanks, Brian,
I can convert my access database (.accdb) to excel worksheet (.xlsx).
Is it possible  in this case  to search, add, edit or delete records using MVD ?

Re: Create an application that depend on an Excel file

Zlaya wrote:

Thanks, Brian,
I can convert my access database (.accdb) to excel worksheet (.xlsx).
Is it possible  in this case  to search, add, edit or delete records using MVD ?

I think the best way is to convert it into sqlite. Then you can use all MVD's feature. search, add, edit, delete, etc.
You can use 3rd party software to migrate your data. In my case, I use Navicat. It's a paid software but you can use the 14-day free fully functional trial. You can directly export data from .accdb to sqlite from there. If you are working with .mdb, you can export it to excel, then from excel, you can export it to sqlite using Navicat. There's a lot of 3rd party database viewer. DB Browser is a free tool, I think you can export csv data using it.

brian

Re: Create an application that depend on an Excel file

how can we print data loaded from ms Access database