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
Cevdet Adanali
NA
5
5.4k
How can i copy-paste data in richtextbox to an excel sheet?
Jan 17 2015 4:43 PM
Hallo,
I have a Form. In this form are a richtextbox with a few data in many rows (lines). I want to copy and paste all data in richtextbox in an excel sheet with a button.
I can copy and paste all richtextbox data in an excel sheet but i have a problem.
data in richtextbox are there many rows (lines). When i click the button bynCopyPasteToExcel it works but all data are in cell A1
How can i copy-paste all data in richtextbox lines in excel ?
code is here :
private void btnCopyPasteToExcel_Click(object sender, EventArgs e)
{
Microsoft.Office.Interop.Excel.Application uygulama = new Microsoft.Office.Interop.Excel.Application();
uygulama.Visible = true;
Microsoft.Office.Interop.Excel.Workbook kitap = uygulama.Workbooks.Add(System.Reflection.Missing.Value);
Microsoft.Office.Interop.Excel.Worksheet sayfa1 = (Microsoft.Office.Interop.Excel.Worksheet)kitap.Sheets[1];
Microsoft.Office.Interop.Excel.Range alan = (Microsoft.Office.Interop.Excel.Range)sSheets.Cells[1,1];
alan.Value2 = richTextBox1.Text;
}
Thanks for help...
Attachment:
test_results.rar
Reply
Answers (
0
)
How to fill in html textbox from (c# )windows application
search collectionBase