我有一个点列表(列表)
我想使用linq表达式来获得最接近0,0的点.例如 - 对于此列表,我预计值为5,42.
如何用LINQ找到最接近0,0点的点?
刚才我看到这个文章关于MVVMC模式.现在我有一个问题.是应该将Controller注入ViewModel,还是将ViewModel注入Controller?
有没有办法将Word文档转换为Excel文件?转换表格会非常有帮助.
像这样的东西:
我的意思是
void OpenWordDoc(string filePath)
{
_documentWord = SpreadsheetDocument.Open(filePath, true);
}
List<string> GetAllTablesXMLTags()
{
//find and copy
}
List<string> CreateExcelFile(string filePath)
{
TemplateExcelDocument excelDocument = new TemplateExcelDocument();
_documentExcel = excelDocument.CreatePackage(filePath);
}
void InsertXmlTagsToExcelFile(string filePath)
{
CreateExcelFiles(filePath);
var xmlTable = GetAllTablesXMLTags();
// ... insert to _documentExcel
}
Run Code Online (Sandbox Code Playgroud)