Click here to Skip to main content
15,902,114 members
Home / Discussions / C#
   

C#

 
AnswerRe: MouseEventArgs and Screen Position Pin
Shree31-May-08 23:13
Shree31-May-08 23:13 
QuestionVSTO Excel Help Pin
sharp_k31-May-08 15:38
sharp_k31-May-08 15:38 
AnswerRe: VSTO Excel Help Pin
jammmie9991-Jun-08 1:41
professionaljammmie9991-Jun-08 1:41 
GeneralRe: VSTO Excel Help Pin
sharp_k1-Jun-08 7:24
sharp_k1-Jun-08 7:24 
Question2 BinaryWriter for a file ? Pin
Xmen Real 31-May-08 15:23
professional Xmen Real 31-May-08 15:23 
AnswerRe: 2 BinaryWriter for a file ? Pin
Anthony Mushrow31-May-08 15:45
professionalAnthony Mushrow31-May-08 15:45 
GeneralRe: 2 BinaryWriter for a file ? Pin
Xmen Real 31-May-08 15:48
professional Xmen Real 31-May-08 15:48 
QuestionfolderBrowserDialog and Saving file Pin
MumbleB31-May-08 10:57
MumbleB31-May-08 10:57 
Hi Guys. I have just spent about 5 hours searching the web trying to find a solution to my problem. I am busy with a project where I am writing data to an Excel file. This works fine. I then want to save the Excel file to a pre-selected directory which the user select using the folderBrowserDialog. Now, I need to know how do I then save my file to the directry selected. I am displaying the Selected path in a txtbox. I only want to save the file to this directory.

follderBrowserDialog code:

private void btSelectDirToSave_Click(object sender, EventArgs e)
{
    if (folderBrowserDialog1.ShowDialog() == DialogResult.OK)
    {
        txtboxSelectExcelDir.Text = folderBrowserDialog1.SelectedPath;
    }
}


File save code:

string namefile;
namefile = txtboxSelectExcelDir.Text;

objExcel.ActiveWorkbook.SaveAs(namefile + "_Nom022.xls",Excel.XlFileFormat.xlWorkbookNormal,Type.Missing,Type.Missing,Type.Missing,
    Type.Missing,Excel.XlSaveAsAccessMode.xlNoChange,Type.Missing,Type.Missing,Type.Missing,Type.Missing);


Any Help would be greatly appreciated as the file is currently not being saved to the selected directory but the Directory name is appended to the filename and saved somewhere else.

Frown | :( Sigh | :sigh: Frown | :(

Excellence is doing ordinary things extraordinarily well.

AnswerRe: folderBrowserDialog and Saving file Pin
That Asian Guy31-May-08 11:11
That Asian Guy31-May-08 11:11 
GeneralRe: folderBrowserDialog and Saving file Pin
MumbleB31-May-08 21:00
MumbleB31-May-08 21:00 
AnswerRe: folderBrowserDialog and Saving file Pin
Shree31-May-08 23:12
Shree31-May-08 23:12 
GeneralRe: folderBrowserDialog and Saving file Pin
MumbleB31-May-08 23:32
MumbleB31-May-08 23:32 
QuestionHow Do I Code Plugins for Other Apps (MSN Messenger)? Pin
That Asian Guy31-May-08 10:49
That Asian Guy31-May-08 10:49 
AnswerRe: How Do I Code Plugins for Other Apps (MSN Messenger)? Pin
MarkB77731-May-08 17:05
MarkB77731-May-08 17:05 
AnswerRe: How Do I Code Plugins for Other Apps (MSN Messenger)? Pin
Shree31-May-08 23:43
Shree31-May-08 23:43 
QuestionHow to find out the pressed key if i have the scan code ?? Pin
Yanshof31-May-08 9:00
Yanshof31-May-08 9:00 
AnswerRe: How to find out the pressed key if i have the scan code ?? Pin
Luc Pattyn31-May-08 9:43
sitebuilderLuc Pattyn31-May-08 9:43 
GeneralI know - but i wanted to use something else also and i needed to use the hook Pin
Yanshof31-May-08 9:49
Yanshof31-May-08 9:49 
GeneralRe: I know - but i wanted to use something else also and i needed to use the hook Pin
GuyThiebaut31-May-08 13:09
professionalGuyThiebaut31-May-08 13:09 
QuestionDeleting a File with active handles Pin
Ian Uy31-May-08 7:23
Ian Uy31-May-08 7:23 
AnswerRe: Deleting a File with active handles Pin
MarkB77731-May-08 17:08
MarkB77731-May-08 17:08 
GeneralRe: Deleting a File with active handles Pin
Ian Uy31-May-08 17:16
Ian Uy31-May-08 17:16 
GeneralRe: Deleting a File with active handles Pin
MarkB77731-May-08 17:46
MarkB77731-May-08 17:46 
QuestionWhy Are These Types Incompatible? Pin
Will Montgomery31-May-08 5:44
Will Montgomery31-May-08 5:44 
AnswerRe: Why Are These Types Incompatible? Pin
Colin Angus Mackay31-May-08 7:11
Colin Angus Mackay31-May-08 7:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.