Quote:
it saved at temp and that's not i want
.. but computers are dumb - that's what you told it to do here
File.WriteAllBytes(@"c:\temp\canva.xlsx", myfile);
you probably need something like
SaveFileDialog savefile = new SaveFileDialog();
savefile.FileName = "canva.xlsx";
savefile.Filter = "Excel files (*.xlsx)|*.xlsx|All files (*.*)|*.*";
savefile.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
if (savefile.ShowDialog() == DialogResult.OK)
{
File.WriteAllBytes(savefile, myfile);
}
This
Quote:
savefile.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
can be set to anywhere appropriate for your application
Does that solve your issue ?