TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Hari B
NA
139
67.7k
Convert Excel to XML
Oct 23 2015 6:05 AM
Hello all ,
code for convert Excel to XML. Please share the code
for example if we upload excel file and click convert button it will be convert to XML file .
private void button2_Click(object sender, EventArgs e)
{
OpenFileDialog();openKeywordsFileDialog.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
openKeywordsFileDialog.Multiselect = false;
openKeywordsFileDialog.ValidateNames = true;
openKeywordsFileDialog.DereferenceLinks = false; // Will return .lnk in shortcuts.
openKeywordsFileDialog.Filter = "Excel |*.xlsx";
openKeywordsFileDialog.FileOk += new System.ComponentModel.CancelEventHandler(OpenKeywordsFileDialog_FileOk);
var dialogResult = openKeywordsFileDialog.ShowDialog();
}
public void OpenKeywordsFileDialog_FileOk(object sender, System.ComponentModel. CancelEventArgs e)
{
OpenFileDialog fileDialog = sender as OpenFileDialog;
string selectedFile = fileDialog.FileName;
Properties.Settings.Default.Save();
textBox1.Text = selectedFile;
if (string.IsNullOrEmpty(selectedFile) || selectedFile.Contains(".lnk"))
{
MessageBox.Show("Please select a valid Excel File");
e.Cancel = true;
}
return;
}
private void ConvertExcel_XML(object sender, EventArgs e)
{
////// ???? code
}
Thank you,
Reply
Answers (
1
)
Exam 70-483
Draw Polygon