|
SAve is a property or a method ?
if it is a method u can specify the filename as the argument.
if it is displaying a dialog, you can hide the dialog and there is a
property called _filename which u can set to the name that u want the file to be saved with.
HOpe u get it and it works for u
Regards,
Pramod
|
|
|
|
|
Hi Pramod,
Thank you for taking time and effort to answer. Sorry for the wrong info given to you. Save is a method.
I tried to make it work as instructed by you. But again, I'm sorry to say that I'm not getting the correct result. I have searched for the Hide property, but not able to find out the same. If you give me the code examples, that would be really great. Following is the code I have written.
_excel.Application.Save(@"C:\abc.xls");
Thanks
Raja Raman S
Reuters India Pvt.Ltd.
Bangalore
|
|
|
|
|
can u send me your code
so that i can see where the problem is
and suggest u a good solution
Regards,
Pramod
|
|
|
|
|
Hi Pramod,
Thank you once again for the reply. Here is the code I have written.
private void ActivateExcel(DataSet M_Dataset, string filename)
{
Excel.ApplicationClass _excel=new Excel.ApplicationClass();
_excel.Application.Workbooks.Add(true);
Worksheets sheets = _excel.Worksheets;
sheets.Add();
Worksheet sheet = sheets[1];
DataTable xlsTbl=M_Dataset.Tables[0];
int ColumnIndex=0;
foreach(DataColumn col in xlsTbl.Columns)
{
ColumnIndex++;
_excel.Cells[1,ColumnIndex]=col.ColumnName;
}
int rowIndex=0;
foreach(DataRow row in xlsTbl.Rows)
{
rowIndex++;
ColumnIndex=0;
foreach(DataColumn col in xlsTbl.Columns)
{
ColumnIndex++;
_excel.Cells[rowIndex+1,ColumnIndex]=row[col.ColumnName];
}
_excel.Application.Save(filename);
}
}
I 'm also calling this function in several places by changing the dataset and file name paramters. I want to put the datasets in separate work sheets but one single work book. That is the requiremnt.
Thanking you once again for your attitude in helping me. Expecting your reply.
Regards
Raja Raman S
Reuters India Pvt.Ltd.
Bangalore
|
|
|
|
|
hi,
Just modify the following
instead of _excel.Application.Workbooks.Add(true);
take the reference in an object of Excel.Workbook
Excel.Workbook wrkbk = _excel.Application.Workbooks.Add(true);
and dont use the _excel.Application.Save()
use the following
wrkbk.SaveCopyAs(filename);
wrkbk.Saved = true;
hope this works for u
Regards,
Pramod
|
|
|
|
|
Hello guys..
I want to create a setup file for my application thats is done vs 2005..
how do i compile the crystal report information to the setup file
cause now when i run the report from my application after setup the is error
itried to copy manually the dll into the directory.. still cannot
diff error come out saying that.. the file to something i n registery..
now i'm a hurry so pls help...
thanks
|
|
|
|
|
It will be helpful if you would mention the error message.
Akif
|
|
|
|
|
its ok i have found a way to do it
anyway thanks for the answer buddy
thanks
|
|
|
|
|
im got stuck with it...help me plz.
-- modified at 3:10 Monday 2nd January, 2006
|
|
|
|
|
hi, i see some code samples in the web site of MySql(http://dev.mysql.com/downloads/connector/net/1.0.html), try download the .net connectors driver.
Bye,
William
|
|
|
|
|
i want to create a folder at run time with the name as current date.
plz help me
|
|
|
|
|
Try This
string path=@"c:\\"+DateTime.Now.Date.ToShortDateString();
path=path.Replace("/","_");
if (!System.IO.Directory.Exists(path))
System.IO.Directory.CreateDirectory(path);
else
MessageBox.Show("Folder Already Exists");
|
|
|
|
|
hello i have used
a datagrid and implemented the dataadapter functions for any update in dataset!
but whenever i delete any row in datagrid or dataset
the hole get created in the database table
like for ex i have records in this manner
BookName
C#
C
C++
Vc++
and if i delete c# then update database by calling
dataadapter.update(ds,"Book_Detail);
the hole get created in table blank field remains in table
is there any way to avoid hole and manage the table
nitinbourai
|
|
|
|
|
Hi,
Is rappi.dll free for use? Can I deliver it with my installation package?
|
|
|
|
|
|
|
jayshml,
RAPI is free of cost,
I suggest you to use OpenNet RAPI library its opensource library
R A M
|
|
|
|
|
I would like to use Win API's SendMessage( wnd, WM_GETTEXTLENGTH, 0, 0 );, or PostMessage function to be able to get the text from the textbox of another program. Let's say, I would like to be able to get the text from Instant Messenger and show it in my App. Does anyone know how to do this!
|
|
|
|
|
The method of getting text from a window is what you know already, but the matter is that usually in instant messengers, the class is not an "EDIT" through which you can GETTEXT. However, it is (usu.) an Internet Explorer_Server class.
You may take a look at http://www.codeproject.com/cpp/yahoochattext.asp[^] for more information.
|
|
|
|
|
I appreciate you giving me that example, but I don't understand it. I'm not very familiar with C++. If you are, could you write me an example of how I would use that. Thanks!!!
|
|
|
|
|
I have created a class library like DLL. How i can make quickly CHM help file for my DLL. Thanks
Nothing
|
|
|
|
|
If you used XML documentation tags in the code you can generate a helpfile using nDoc http://ndoc.sourceforge.net/[^]
WM.
What about weapons of mass-construction?
|
|
|
|
|
Dear Friends
I am making an application and need to capture the event when RichTexBox control's vertical scrollbar's values changes. There is an event named VScroll but it is fired when mouse is first time clicked on scroll bar. I need the event when the value of scroll bar changes like when we drag the bullet on the scroll bar or when we manually press the down/Up arrow button when the textbox is in focus and text is scrolled up or down.
Any help will be highly appreciated
Thanks in advance...
|
|
|
|
|
Hi,
You can capture it in the VScroll event itself
When u press the Up/Down arrow keys the VScroll event is fired when the cursor moves out of the Current visible part of the RichtextBox.
Regards
Pramod
|
|
|
|
|
Thanks Dear
But How can I get the value of scrollbar when the event is fired?
Please Reply as soon as possible
Thanks and Regards
|
|
|
|