Copy Excel workbook with a pre-configured DSN to other computers

0

I am working on one Excel 2010 report using one workbook with a few worksheets. The first sheet has a field to enter a number and upon update it passes that number to a stored procedure in SQL server, and SQL server sends various responses into each worksheet.

I do not seem to able to just take this spreadsheet and make it work on other computers without the DSN failing, and upon re-creating it locally the spreadsheet formatting just falls to pieces. This is for printing, so any change in formatting is unacceptable.

All computers, including my own are the same, with 64-bit Windows 7, Office 10, all users authenticate through the domain, no local login.

It is positively me not doing something right. First, I am not sure what to use - system or user DSN. Then I am not sure how to create/install and transfer that DSN file to the correct location. I do not have access to the user's PC, and I want to send the spreadsheet, the DSN and the installation instructions to the infrastructure administrator who is going to install it for anyone requesting it, instead of let him figure it out for me.

The SQL login is a user account with sufficient access to the database, not a domain account, it is read-only, and I am able to make it work every time when I create a user DSN on a computer - but then I am worried if another user logs in (the manager's assistant or whoever) the DSN going to fail again. And again, every time I do that formatting is gone.

Is there a way to create a network DSN on a common share (there is a T drive mapping everyone including domain guests have at least a read access). I have writes to it, but when I do that I cannot see the DSN from Excel. Is such DSN supposed to go into a specific network share, not just any share?

What would be a really straight-forward solution to this, which works in this standardized environment for any user on any PC? I guess my major concern is to see when copying the Excel file anything is going to change in the formatting. Any way I could make this work so far just obliterated the dynamic field formats. All reports have unknown and constantly changing row counts, and copying data between sheets would work with large ranges but that is my last resort.

In our production environment I feel lucky when I can access any other workstation for a solid 15 minutes to monkey around with this.

In a few hours I am going to work again and I am willing to try anything.

EDIT: In Excel I use "From Other Source", select "From SQL Server", then I enter all the connection info and I am able execute the sproc "EXECUTE dbo.xxx ?", where the question mark is the value of the work order.

But this only works on the workstation where I created the connection, I do not have a clue what or how to save and share this connection info in a file. I would like to package the spreadsheet, the text file with the "Provider=SQLOLEDB... etc" and drop both onto another PC instead of have our admin walking from workstation to workstation and go through this Excel configuration process.

Besides every time I re-create the connection the dynamic fields swap places, and the size-formatting is lost.

SQL Query Result

The result, when it works correctly looks like that. Only the records under Barcodes line are dropped directly from SQL, the rest are copied/calculated from the other sheets.

arch-abit

Posted 2014-05-20T16:45:07.517

Reputation: 455

What do you mean when you say "DSN fails" and "formatting falls to pieces". What exactly is happening? – Raystafarian – 2014-05-20T19:40:23.773

I am going to edit this reply once I got to work and able to look at the screen, so I am going to be able to quote in verbatim and maybe post some small screen shots. – arch-abit – 2014-05-20T19:51:06.120

No answers