0

Can I create a macro written in C# for Excel that allows me to export a cell's data to a SQL Server or Access database?

Basically, I'd like to create a button in Excel that saves the data in certain cells to a database. Can this be done?

Instead of creating a UI from scratch for a program, I've decided using Excel as the user environment would be better for business needs.

1
  • Does it have to be written in C#? Aren't macros in Excel typically written in VBA? Commented Dec 24, 2008 at 8:26

1 Answer 1

1

How to automate Excel by using Visual C# to fill or to obtain data in a range by using arrays would be a good starting point.

Be aware, you're going to find it frustrating to control what people attempt to enter into the Excel sheet, as the inherit flexibility of the data works again your efforts to write it to a database destination.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.