473,381 Members | 1,385 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,381 software developers and data experts.

c# saving an excel file without displaying dialog box.

Hi frends,

In my application, a class supports backend processing. In this class im creating a new excel sheet and im inserting some data into this excel sheet, and im trying to save the file with the help of methods SAVE AND SAVE AS. But it is displaying save dialog while it is saving. But since it is backend class i dont want that dialog. Is there any other way to save the excel file without displaying save dialog .


PLZ HELP ME .

THANK U .
Dec 23 '06 #1
7 11127
kenobewan
4,871 Expert 4TB
The short answer is that the dialog box is a feature to let users control the process amd is there by default. If you work around this you lose customer focus - how are they going to know what you have downloaded and where? I suggest leaving for the benefit of your users.
Dec 23 '06 #2
So,

According to u if i left this saving to the user let me suppose that in my application if i want to create 10 excel files every time user has to operate with the dialog box (10 times) its very difficult right. that is the problem of mine.


Any way thank u for ur reply.
Dec 24 '06 #3
kenobewan
4,871 Expert 4TB
What if you were to zip the flies?
Code to easily create zip files on the fly

I am thinking about design and how you communicate with your user, gain their trust and keep them coming back. Communication is the key. I suggest giving them the choice and presenting options.

Hope that you are still smiling :).
Dec 26 '06 #4
Hi frends,

In my application, a class supports backend processing. In this class im creating a new excel sheet and im inserting some data into this excel sheet, and im trying to save the file with the help of methods SAVE AND SAVE AS. But it is displaying save dialog while it is saving. But since it is backend class i dont want that dialog. Is there any other way to save the excel file without displaying save dialog .


PLZ HELP ME .

THANK U .

hey could u send the code for SAVE and SAVEAS methods cause when i am not geeting the dialog box.It will be really helpful
thanx
Jan 19 '07 #5
hi,

Check this code

excel = new Excel.ApplicationClass();
workbooks = excel.Workbooks;
workbook = workbooks.Add(true);
ExportCurrentData(ref excel,dsData, dataSetIndex);
worksheet = (Excel.Worksheet)excel.ActiveSheet;
worksheet.Activate();
excel.saveworkspace();
Jan 19 '07 #6
Atli
5,058 Expert 4TB
Are you setting a path where the file should be saved before you trigger the save method?

Is there perhaps an overload to the save method where you can manually set the file path?

It seemes to me that the dialog box is shown becaus for obvious reasons, the class needs a place to save the file.
Jan 19 '07 #7
After u got the save dialog then u can provide the path which u want. Think initially it goes to my documents location.
Jan 19 '07 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Vikram | last post by:
Hi, Given below is my task. An user can open the xls file from my website (loaded on the top frame). After filling the Excel, he can click a send button at the bottom frame. By clicking the...
1
by: Helmut Blass | last post by:
hi Access-freaks, in MS Access, I generate an Excel file where the user should have the possibility to determine the excel file name by file dialog. so I use the following command: ...
10
by: KeithRaginF | last post by:
Hello I am trying to return the contents of an Excel file. However, I don't want to just redirect the request to the Excel file since it does not reside in a location where that is appropriate. ...
1
by: NBKMNDN | last post by:
Hi frends, In my C# application im creating a new excel sheet and im inserting some data into this excel sheet, and im trying to save the file with the help of method SAVE AS. But it doesnot...
2
by: DPK | last post by:
Hello friends!!! I made a prog. to make the excel. It is running well but when it saves the excel file it open the save dialog box to save the file becasue I am using SAVE function here instead of...
6
by: Karl | last post by:
Hi all, It may seem like a rather odd request (or not) but I would like to be able to create a file (doc, jpg, xls or one of many other files that can be automated) on a website and stream it to...
0
by: veer | last post by:
hello expert i am facing a probleum of saving the out put in excel sheet actually i have two buttons on my vb form i,e merge entery and merge verify and when i execute my program one by one...
6
by: Eddie | last post by:
Hi all, I am displaying a number of reports, and giving the users an option to display them on the web or download them to Excel. If they want the Excel file, I just use the PHP header command...
6
by: provor | last post by:
Hello, I have the following code that I am using when a user presses a button to import an excel file into a table. The code is hard coded to point to the correct table. This works great for this...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.