使用Windows批处理文件从CSV中删除最后一个空行 [英] Remove last blank line from CSV using windows batch file

查看:600
本文介绍了使用Windows批处理文件从CSV中删除最后一个空行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,


我对CSV有一些奇怪的问题。我们正在使用两个第三方应用程序,我们必须使用CSV将数据从一个应用程序移动到另一个应用程序。但是,问题是,一个应用程序生成的CSV被其他应用程序拒绝,因为CSV文件末尾的额外空行
。我们的结果不是添加该行但是当我们打开CSV时,我们总是在最后一个空白行上找到一个光标。如果我们删除该文件,则另一个应用程序接受该文件。



所以,在这里我想知道如何删除最后一个空白使用WINDOWS BATCH文件以CSV格式生效?




在上图中,我想删除第4行。



请帮我解决这个问题。

解决方案

您的CSV文件是否包含要保留的空行?

Hello,

I have some weird problem with the CSV. We have two third party applications in use and we have to move data from one application to another using CSV. But, the problem is, CSV generated by one application is getting rejected by other application just because of the extra blank line  at the end in the CSV file. Our results are not adding that line but somehow when we open the CSV we always found a cursor on last blank line. If we remove that file then the another application accepts that file.

So, here I would like to know how can I remove the last blank line in CSV using WINDOWS BATCH file?

In the above image, I want to remove the line no #4.

Please help me with this.

解决方案

Do your CSV files ever contain blank lines that you want to keep?


这篇关于使用Windows批处理文件从CSV中删除最后一个空行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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