[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


How to include a formatted xls file, while creating a Setup wizard project in VS2010

Posted on 2012-09-05
Medium Priority
Last Modified: 2012-09-06
I have windows desktop application which has several forms, crystal reports etc.
and 1 formatted xls file named "invoice.xls"

Below are the steps I followed to create a Setup project in VS2010 for VB.NET Windows application.

1. In the windows XYZ project. Changed mode to release and Build the application.
2. Created new project --> other projects --> Setup and deployment --> visual studio installer and choosed option "Setup Wizard"
3. Choosed setup for Windows application
4. Added all files under Release folder of XYZ project.
5. Then all stuffs like giving pre-requities,  setting up desktop folder, program menu. was done.
6. Then I have build the application in debug mode.
7. Changed from Debug to Release and build the application.

Took all files in release folder as package setup.
there were setup.exe and msi files and other pre-requities.

After installing ....all my crystal reports are working fine .....Even datagrid and export to excel is also working fine.

But there is one report after click of the button it should open with the formatted invoice.xls file....the xls file opens with a grey screen..no data ....and no files is saved to particular path.......

Also I tried by adding this invoice xls file in step while creating the project....still its not working.....

The inovice.xls works fine if I run (f5) the project XYZ .....

Please help me work to make this invoice.xls work in creating the setup project.....
Question by:anbu210
  • 3

Author Comment

ID: 38368355
Just FYI....

I used  below code to point to the xls file in my project

fso.CopyFile(Replace(My.Application.Info.DirectoryPath, "\bin\Debug", "") & "\Invoice.xls", strName)

Do I have to change this way of pointing the xls file....

Remember this works good in debuggging mode and output is perfect....however only if a create a setup project it doesn't work...

Accepted Solution

anbu210 earned 0 total points
ID: 38371644
Finally I solved myself.....

While building the project XYZ in release mode I found that invoice.xls file was included in the project. I clicked "Show all files" and Excluded from the project and then build the application in release mode.

and in the setup 4 mentioned above.....I added the files from release folder of XYZ and also added the xls file.....Everything is working as expected now.

Author Closing Comment

ID: 38371646
I solved myself....It worked

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question