使用Windows批处理文件从CSV中删除最后一个空行

编程入门 行业动态 更新时间:2024-10-27 11:22:54
本文介绍了使用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中删除最后一个空行

本文发布于:2023-05-27 19:32:55,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/300559.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:空行   批处理文件   Windows   CSV

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!