用C编程.csv文件直接访问一个单元格 [英] Access a cell directly in .csv file using C programming

查看:82
本文介绍了用C编程.csv文件直接访问一个单元格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿,伙计们!
有没有在使用C .csv文件格式直接访问一个细胞什么办法?
例如我想用C来总结一列,我该怎么做呢?

hey guys! is there any way of directly accessing a cell in a .csv file format using C? e.g. i want to sum up a column using C, how do i do it?

推荐答案

如果你必须使用C:读取整个行记忆,去couting,直到你达到你想要的那一栏,阅读的价值和概括,进入下一行。

If you have to use C: read the entire line to memory, go couting "," until you reach your desired column, read the value and sum it, go to next line.

当你到达你的价值,你可以使用sscanf会读取它。

When you reach your value, you can use sscanf to read it.

这篇关于用C编程.csv文件直接访问一个单元格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆