Using Excel as a frontend to a backend Excel DB

rael_lucid

Board Regular
Joined
Aug 7, 2003
Messages
58
Hi,

To make a really long story a little shorter, this is my situation:

I have an excel (2003) workbook with approximately 20 sheets. Each is fairly heavily formatted and is used as a data entry form. Each sheet is protected so the user can only enter values in appropriate cells.

Users require the ability to be able to SAVE the data into a "data only" workbook, and LOAD preexisting data from a "data only" workbook.

I originally used the worksheet.copy method, but due to the following MS Excel bug - http://support.microsoft.com/kb/210684 - I am unable to rely on it.

Because there are approximately 10000 unprotected cells in the 20 sheets, looping through them one at a time simply takes too long (especially when it comes to LOADing an existing backend - approx 60 seconds).

So, I have had to find another method of doing this.

I have set up named ranges for all the unprotected cells which I use for clearing the sheets (when required), and my thinking is to perhaps somehow use these named ranges to speed up the process. However, because the ranges are made up of data in non-adjacent cells, I am unable to use Copy and Paste methods.

At this point, the only way I can see to do this is to basically do the following:

To Save Data:
Create a new workbook with the same sheetname structure
For each sheet, unprotect, then select and copy all cells.
Paste contents into appropriate sheet on new workbook.
Reprotect sheet in "frontend"

To Load Data:
Open presaved workbook
Unprotect and unhide all sheets in "frontend"
For each sheet in presaved data workbook, select and copy all cells
Paste contents into appropriate sheet in frontend.
Reprotect and hide sheets in frontend.

I believe that this will work, but I have some concerns:
1) it seems like a messy way, would prefer something a little more professional
2) when loading data, is this going to affect my named ranges in the frontend?

Any suggestions welcomed.

Rael
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Why not just have a hidden sheet referencing all of the data cells in the other sheets, and save that when required?
 
Upvote 0
That was actually the original approach I had taken with the development of the solution. And it worked really well for Saving. Loading however required me to effectively reverse the process. Again, this worked well, except that it just took too long to rebuild the data sheets as it had to go through approx 10000 rows of data. Loading time for the sheets was over a minute in some cases, which was unacceptable to my client (and me, for that matter).

Rael
 
Upvote 0

Forum statistics

Threads
1,215,032
Messages
6,122,772
Members
449,095
Latest member
m_smith_solihull

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top