简体   繁体   English

Excel Automation C#

[英]excel automation c#

I am trying to create excel order form which will have price and qty columns and customer will put the values in the qty column and excel will update order cost column. 我正在尝试创建将具有价格和数量列的excel订单表格,客户将把值放在数量列中,而excel将更新订单成本列。 problem i am facing right now is that number of columns in excel file is changing ie user can select multiple columns. 我现在面临的问题是Excel文件中的列数正在更改,即用户可以选择多个列。 so price column location is different every time how to put formula in the column in order cost column to reference product price column 因此,每次如何将公式放入订单成本列中的公式以引用产品价格列时,价格列的位置都不同

If your qty column has a fixed column title, you could find it out by iterating the first row, and than use that information to correctly position the order cost formula. 如果您的数量列具有固定的列标题,则可以通过迭代第一行来找到它,然后使用该信息正确定位订单成本公式。

But, it's hard to give a useful answer if you don't provide any more info, example of your tables or code... 但是,如果您不提供更多信息(例如表格或代码示例),则很难给出有用的答案...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM